mirror of
https://github.com/bitwarden/server.git
synced 2024-12-24 17:17:40 +01:00
simplified cors policy
This commit is contained in:
parent
02839f2046
commit
eea119a4b6
@ -122,14 +122,6 @@ namespace Bit.Api
|
||||
services.AddBaseServices();
|
||||
services.AddDefaultServices(globalSettings);
|
||||
|
||||
// Cors
|
||||
services.AddCors(config =>
|
||||
{
|
||||
config.AddPolicy("All", policy => policy
|
||||
.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin().AllowCredentials()
|
||||
.SetPreflightMaxAge(TimeSpan.FromDays(1)));
|
||||
});
|
||||
|
||||
// MVC
|
||||
services.AddMvc(config =>
|
||||
{
|
||||
@ -197,7 +189,7 @@ namespace Bit.Api
|
||||
app.UseStaticFiles();
|
||||
|
||||
// Add Cors
|
||||
app.UseCors("All");
|
||||
app.UseCors(policy => policy.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader().AllowCredentials());
|
||||
|
||||
// Add authentication to the request pipeline.
|
||||
app.UseAuthentication();
|
||||
|
Loading…
Reference in New Issue
Block a user