Skip to content

Commit

Permalink
remove "all" cors policyh
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasgangso committed Oct 27, 2022
1 parent cd283fa commit 4799daf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions livestream/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton<IAmazonS3>((s) => new AmazonS3Client(awsCredentials, RegionEndpoint.EUNorth1));
services.AddSingleton<IAmazonCloudFront>((s) => new AmazonCloudFrontClient(awsCredentials, RegionEndpoint.EUNorth1));
services.AddSingleton((s) => new UrlSigner(s.GetRequiredService<IAmazonCloudFront>(), privateKey, keyPairId));
services.AddCors(options => {
options.AddPolicy("All", builder => {
builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader();
});
});
services.AddCors();

services.AddAuthorization(options => {
options.DefaultPolicy = new AuthorizationPolicyBuilder()
Expand Down

0 comments on commit 4799daf

Please sign in to comment.