fix(#IWUSU): nginx 代理模式下获取真实IP
#Comment comment #IWUSU #Issue close https://gitee.com/LongbowEnterprise/dashboard/issues?id=IWUSU
This commit is contained in:
parent
16ec57577b
commit
42146655a5
|
@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Builder;
|
|||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Versioning;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
@ -116,6 +117,7 @@ namespace Bootstrap.Admin
|
|||
/// <param name="env"></param>
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
{
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions() { ForwardedHeaders = ForwardedHeaders.All });
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
|
|
Loading…
Reference in New Issue