mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add UseForwardedHeaders because nginx
This commit is contained in:
parent
5a6a3baa00
commit
05fbd08113
1 changed files with 5 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
using FilterLists.Data.DependencyInjection.Extensions;
|
||||
using FilterLists.Services.DependencyInjection.Extensions;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
|
|
@ -25,6 +26,10 @@ public void ConfigureServices(IServiceCollection services)
|
|||
|
||||
public void Configure(IApplicationBuilder app)
|
||||
{
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
{
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|
||||
});
|
||||
app.UseMvc();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue