From d4593744e00a511fa14af17f7d831faf2ae85013 Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson Date: Wed, 8 Nov 2023 14:19:09 +0100 Subject: [PATCH 1/2] Update dashCorsPolicy to also include the development enviroment 'https://variantdash-dev.azurewebsites.net'. --- src/Web/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Web/Program.cs b/src/Web/Program.cs index a4b7701..1329da6 100644 --- a/src/Web/Program.cs +++ b/src/Web/Program.cs @@ -38,7 +38,7 @@ policy => { policy.AllowAnyMethod().AllowAnyHeader() - .WithOrigins("https://dash.variant.no", "http://localhost:3000"); + .WithOrigins("https://dash.variant.no", "https://variantdash-dev.azurewebsites.net", "http://localhost:3000"); }); } else @@ -252,4 +252,4 @@ namespace Web public partial class Program { } -} \ No newline at end of file +} From 3bd713e7459e2ed1bc12fc3bb60351ac37c596df Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson Date: Wed, 8 Nov 2023 14:33:08 +0100 Subject: [PATCH 2/2] Added dash.dev to allowOrigin in production. --- src/Web/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Web/Program.cs b/src/Web/Program.cs index 1329da6..ee940c9 100644 --- a/src/Web/Program.cs +++ b/src/Web/Program.cs @@ -47,7 +47,7 @@ options.AddPolicy("DashCorsPolicy", policy => { - policy.AllowAnyMethod().AllowAnyHeader().WithOrigins("https://dash.variant.no"); + policy.AllowAnyMethod().AllowAnyHeader().WithOrigins("https://dash.variant.no", "https://variantdash-dev.azurewebsites.net"); }); } }