1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

SetIdentityServerOrigin for all non-dev (#925)

This commit is contained in:
Kyle Spearrin
2020-09-09 14:47:52 -04:00
committed by GitHub
parent d7e45fe0a3
commit 82b6216e95
2 changed files with 10 additions and 2 deletions

View File

@ -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);
}