mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05: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();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
// Add Cors
|
// 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.
|
// Add authentication to the request pipeline.
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
@ -94,7 +94,9 @@ namespace Bit.Events
|
|||||||
app.UseDefaultMiddleware(env);
|
app.UseDefaultMiddleware(env);
|
||||||
|
|
||||||
// Add Cors
|
// 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.
|
// Add authentication to the request pipeline.
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
@ -94,7 +94,9 @@ namespace Bit.Notifications
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add Cors
|
// 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.
|
// Add authentication to the request pipeline.
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user