diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-02-11 23:42:59 +0100 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-02-11 23:42:59 +0100 |
| commit | ae21238f7bf935904938db664f4073ae46c7fea3 (patch) | |
| tree | 9e47c3a8d5b2c4bfc572dae54c0636266ea04372 /src | |
| parent | 423235ec68e75a5d42b9cb1bcdefafc3fc97ca64 (diff) | |
| download | bookmark-thing-ae21238f7bf935904938db664f4073ae46c7fea3.tar.xz bookmark-thing-ae21238f7bf935904938db664f4073ae46c7fea3.zip | |
feat: Cors config is only used in dev, reverse proxy handles production
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/Startup.cs | 12 |
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(); |
