mirror of
https://github.com/bitwarden/server.git
synced 2025-05-22 20:11:04 -05:00
UseForwardedHeaders on admin
This commit is contained in:
parent
b3c48fd3fa
commit
9cf036227e
@ -4,6 +4,7 @@ using Bit.Core.Identity;
|
|||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.HttpOverrides;
|
||||||
using Microsoft.AspNetCore.Routing;
|
using Microsoft.AspNetCore.Routing;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
@ -79,6 +80,10 @@ namespace Bit.Admin
|
|||||||
if(globalSettings.SelfHosted)
|
if(globalSettings.SelfHosted)
|
||||||
{
|
{
|
||||||
app.UsePathBase("/admin");
|
app.UsePathBase("/admin");
|
||||||
|
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||||
|
{
|
||||||
|
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(env.IsDevelopment())
|
if(env.IsDevelopment())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user