mirror of
https://github.com/bitwarden/server.git
synced 2025-03-15 13:59:25 +01:00
allow web vault origin for cors requests
This commit is contained in:
parent
a0da6b3886
commit
f6da38f931
@ -160,7 +160,9 @@ namespace Bit.Api
|
||||
app.UseStaticFiles();
|
||||
|
||||
// Add Cors
|
||||
app.UseCors(policy => policy.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader().AllowCredentials());
|
||||
app.UseCors(policy => policy
|
||||
.WithOrigins(globalSettings.BaseServiceUri.Vault)
|
||||
.AllowAnyMethod().AllowAnyHeader().AllowCredentials());
|
||||
|
||||
// Add authentication to the request pipeline.
|
||||
app.UseAuthentication();
|
||||
|
@ -94,7 +94,9 @@ namespace Bit.Events
|
||||
app.UseDefaultMiddleware(env);
|
||||
|
||||
// Add Cors
|
||||
app.UseCors(policy => policy.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader().AllowCredentials());
|
||||
app.UseCors(policy => policy
|
||||
.WithOrigins(globalSettings.BaseServiceUri.Vault)
|
||||
.AllowAnyMethod().AllowAnyHeader().AllowCredentials());
|
||||
|
||||
// Add authentication to the request pipeline.
|
||||
app.UseAuthentication();
|
||||
|
@ -94,7 +94,9 @@ namespace Bit.Notifications
|
||||
}
|
||||
|
||||
// Add Cors
|
||||
app.UseCors(policy => policy.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader().AllowCredentials());
|
||||
app.UseCors(policy => policy
|
||||
.WithOrigins(globalSettings.BaseServiceUri.Vault)
|
||||
.AllowAnyMethod().AllowAnyHeader().AllowCredentials());
|
||||
|
||||
// Add authentication to the request pipeline.
|
||||
app.UseAuthentication();
|
||||
|
Loading…
Reference in New Issue
Block a user