mirror of
https://github.com/bitwarden/server
synced 2025-12-22 11:13:27 +00:00
allow cors origin wildcard
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user