From 9bc01fb0e0214d0ccd08dc26fe536be880817922 Mon Sep 17 00:00:00 2001 From: nielses Date: Mon, 8 May 2023 08:01:06 +1000 Subject: [PATCH] Allow multiple allowed origons to be set Git ignore intellij files --- .gitignore | 3 +++ src/Program.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 077c449..9ce1349 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ src/wwwroot # Runtime data keys tempkey.jwk + +#Intellij +.idea diff --git a/src/Program.cs b/src/Program.cs index 49a6ca9..56e018e 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -64,7 +64,7 @@ var corsOptions = Config.GetServerCorsAllowedOrigins(); app.UseCors(builder => builder - .WithOrigins(corsOptions.First()) + .WithOrigins(corsOptions.ToArray()) .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials());