mirror of
https://github.com/bitwarden/server
synced 2025-12-24 12:13:17 +00:00
SetIdentityServerOrigin for all non-dev (#925)
This commit is contained in:
@@ -144,7 +144,7 @@ namespace Bit.Identity
|
||||
|
||||
app.UseSerilog(env, appLifetime, globalSettings);
|
||||
|
||||
if (globalSettings.SelfHosted)
|
||||
if (!env.IsDevelopment())
|
||||
{
|
||||
var uri = new Uri(globalSettings.BaseServiceUri.Identity);
|
||||
app.Use(async (ctx, next) =>
|
||||
@@ -152,6 +152,10 @@ namespace Bit.Identity
|
||||
ctx.SetIdentityServerOrigin($"{uri.Scheme}://{uri.Host}");
|
||||
await next();
|
||||
});
|
||||
}
|
||||
|
||||
if (globalSettings.SelfHosted)
|
||||
{
|
||||
app.UsePathBase("/identity");
|
||||
app.UseForwardedHeaders(globalSettings);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user