mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
set cors policies to only allow web vault origin (#787)
* set cors policy to only allow web vault * vault cors policy service
This commit is contained in:
@ -169,7 +169,7 @@ namespace Bit.Api
|
||||
app.UseRouting();
|
||||
|
||||
// Add Cors
|
||||
app.UseCors(policy => policy.SetIsOriginAllowed(h => true)
|
||||
app.UseCors(policy => policy.SetIsOriginAllowed(o => o == globalSettings.BaseServiceUri.Vault)
|
||||
.AllowAnyMethod().AllowAnyHeader().AllowCredentials());
|
||||
|
||||
// Add authentication and authorization to the request pipeline.
|
||||
|
Reference in New Issue
Block a user