1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-29 13:25:17 +01:00

allow cors origin wildcard

This commit is contained in:
Kyle Spearrin 2019-08-22 12:00:10 -04:00
parent 669a7c00d8
commit 19850631f6
3 changed files with 3 additions and 9 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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();