1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

UseForwardedHeaders on admin

This commit is contained in:
Kyle Spearrin 2018-06-09 23:57:26 -04:00
parent b3c48fd3fa
commit 9cf036227e

View File

@ -4,6 +4,7 @@ using Bit.Core.Identity;
using Bit.Core.Utilities;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@ -79,6 +80,10 @@ namespace Bit.Admin
if(globalSettings.SelfHosted)
{
app.UsePathBase("/admin");
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
}
if(env.IsDevelopment())