From 4799daf39ee7b789e75cfc21178343f19d583332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Gangs=C3=B8?= Date: Thu, 27 Oct 2022 11:25:05 +0200 Subject: [PATCH] remove "all" cors policyh --- livestream/Startup.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/livestream/Startup.cs b/livestream/Startup.cs index f11c98b..230431a 100644 --- a/livestream/Startup.cs +++ b/livestream/Startup.cs @@ -69,11 +69,7 @@ public void ConfigureServices(IServiceCollection services) services.AddSingleton((s) => new AmazonS3Client(awsCredentials, RegionEndpoint.EUNorth1)); services.AddSingleton((s) => new AmazonCloudFrontClient(awsCredentials, RegionEndpoint.EUNorth1)); services.AddSingleton((s) => new UrlSigner(s.GetRequiredService(), privateKey, keyPairId)); - services.AddCors(options => { - options.AddPolicy("All", builder => { - builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader(); - }); - }); + services.AddCors(); services.AddAuthorization(options => { options.DefaultPolicy = new AuthorizationPolicyBuilder()