From 1346f90bf53e60a88efbda60ef9450414cdb7f5d Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Mon, 27 Jul 2020 12:44:05 -0700 Subject: [PATCH] Remove cors --- samples/voting/IdentityServer/Startup.cs | 4 ---- samples/voting/results/Startup.cs | 6 ------ samples/voting/results/results.csproj | 13 ------------- 3 files changed, 23 deletions(-) diff --git a/samples/voting/IdentityServer/Startup.cs b/samples/voting/IdentityServer/Startup.cs index 65b836a0..0816c4c8 100644 --- a/samples/voting/IdentityServer/Startup.cs +++ b/samples/voting/IdentityServer/Startup.cs @@ -33,10 +33,6 @@ namespace IdentityServer public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews(); - services.AddSingleton((sp) => - { - return new DefaultCorsPolicyService(sp.GetRequiredService>()){AllowAll = true}; - }); var builder = services.AddIdentityServer(options => { diff --git a/samples/voting/results/Startup.cs b/samples/voting/results/Startup.cs index e07a055e..19d5a849 100644 --- a/samples/voting/results/Startup.cs +++ b/samples/voting/results/Startup.cs @@ -24,8 +24,6 @@ namespace Results services.AddRazorPages(); services.AddServerSideBlazor(); - services.AddCors(); - JwtSecurityTokenHandler.DefaultMapInboundClaims = false; services.AddAuthentication(options => @@ -57,10 +55,6 @@ namespace Results } app.UseStaticFiles(); - app.UseCors(builder => - { - builder.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin(); - }); app.UseRouting(); app.UseAuthentication(); diff --git a/samples/voting/results/results.csproj b/samples/voting/results/results.csproj index 13ef9224..fdf0bd1b 100644 --- a/samples/voting/results/results.csproj +++ b/samples/voting/results/results.csproj @@ -19,17 +19,4 @@ - - - - - - - - - - - - -