From 19850631f631b0247b288025b4615b4235f4186e Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 22 Aug 2019 12:00:10 -0400 Subject: [PATCH] allow cors origin wildcard --- src/Api/Startup.cs | 4 +--- src/Events/Startup.cs | 4 +--- src/Notifications/Startup.cs | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Api/Startup.cs b/src/Api/Startup.cs index 7b4f0ee81d..4a03c3e0ee 100644 --- a/src/Api/Startup.cs +++ b/src/Api/Startup.cs @@ -162,9 +162,7 @@ namespace Bit.Api app.UseStaticFiles(); // Add Cors - app.UseCors(policy => policy - .WithOrigins(globalSettings.BaseServiceUri.Vault) - .AllowAnyMethod().AllowAnyHeader().AllowCredentials()); + app.UseCors(policy => policy.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); // Add authentication to the request pipeline. app.UseAuthentication(); diff --git a/src/Events/Startup.cs b/src/Events/Startup.cs index e97f9d053b..a14f9ba3ef 100644 --- a/src/Events/Startup.cs +++ b/src/Events/Startup.cs @@ -94,9 +94,7 @@ namespace Bit.Events app.UseDefaultMiddleware(env); // Add Cors - app.UseCors(policy => policy - .WithOrigins(globalSettings.BaseServiceUri.Vault) - .AllowAnyMethod().AllowAnyHeader().AllowCredentials()); + app.UseCors(policy => policy.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); // Add authentication to the request pipeline. app.UseAuthentication(); diff --git a/src/Notifications/Startup.cs b/src/Notifications/Startup.cs index 0cd0dd1d71..3cfff38d9e 100644 --- a/src/Notifications/Startup.cs +++ b/src/Notifications/Startup.cs @@ -94,9 +94,7 @@ namespace Bit.Notifications } // Add Cors - app.UseCors(policy => policy - .WithOrigins(globalSettings.BaseServiceUri.Vault) - .AllowAnyMethod().AllowAnyHeader().AllowCredentials()); + app.UseCors(policy => policy.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); // Add authentication to the request pipeline. app.UseAuthentication();