mirror of
https://github.com/bitwarden/server
synced 2025-12-16 08:13:33 +00: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