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:
parent
b3c48fd3fa
commit
9cf036227e
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user