mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 05:13:18 -07:00
Added the ForwardedHeaders middlewear for Reverse Proxy scenarios #865
This commit is contained in:
parent
5294205f40
commit
956b4f6697
1 changed files with 5 additions and 0 deletions
|
@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.AspNetCore.SpaServices.Webpack;
|
||||
|
@ -194,6 +195,10 @@ namespace Ombi
|
|||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory,
|
||||
IMemoryCache cache, IServiceProvider serviceProvider)
|
||||
{
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
{
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|
||||
});
|
||||
|
||||
var ctx = serviceProvider.GetService<IOmbiContext>();
|
||||
loggerFactory.AddSerilog();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue