summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-02-11 23:42:59 +0100
committerivarlovlie <git@ivarlovlie.no>2022-02-11 23:42:59 +0100
commitae21238f7bf935904938db664f4073ae46c7fea3 (patch)
tree9e47c3a8d5b2c4bfc572dae54c0636266ea04372
parent423235ec68e75a5d42b9cb1bcdefafc3fc97ca64 (diff)
downloadbookmark-thing-ae21238f7bf935904938db664f4073ae46c7fea3.tar.xz
bookmark-thing-ae21238f7bf935904938db664f4073ae46c7fea3.zip
feat: Cors config is only used in dev, reverse proxy handles production
-rw-r--r--src/server/Startup.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/Startup.cs b/src/server/Startup.cs
index effe0a7..7010829 100644
--- a/src/server/Startup.cs
+++ b/src/server/Startup.cs
@@ -126,12 +126,12 @@ public class Startup
public void Configure(IApplicationBuilder app) {
if (WebHostEnvironment.IsDevelopment()) {
app.UseDeveloperExceptionPage();
- app.UseCors(x => x
- .AllowAnyMethod()
- .AllowAnyHeader()
- .WithOrigins("http://localhost:3000")
- .WithOrigins("https://bmt.ivarlovlie.no")
- .AllowCredentials());
+ app.UseCors(builder => {
+ builder.AllowAnyMethod();
+ builder.AllowAnyHeader();
+ builder.WithOrigins("http://localhost:3000");
+ builder.AllowCredentials();
+ });
}
app.UseRouting();