From d3159aaa9d541cc2468d0bc6de2b742bf555731d Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 2 Sep 2019 11:21:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=89=8D=E5=8F=B0?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AFIP=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Client/Startup.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Bootstrap.Client/Startup.cs b/Bootstrap.Client/Startup.cs index ed3c4914..a8f0e8db 100644 --- a/Bootstrap.Client/Startup.cs +++ b/Bootstrap.Client/Startup.cs @@ -4,6 +4,7 @@ using Longbow.Web.SignalR; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.HttpOverrides; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -14,12 +15,12 @@ using System; namespace Bootstrap.Client { /// - /// + /// Startup 启动配置文件 /// public class Startup { /// - /// + /// 构造函数 /// /// public Startup(IConfiguration configuration) @@ -28,13 +29,13 @@ namespace Bootstrap.Client } /// - /// + /// 获得 系统配置项 Iconfiguration 实例 /// public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. /// - /// + /// 服务容器注入方法 /// /// public void ConfigureServices(IServiceCollection services) @@ -71,12 +72,13 @@ namespace Bootstrap.Client // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. /// - /// + /// 管道构建方法 /// /// /// public void Configure(IApplicationBuilder app, IHostingEnvironment env) { + app.UseForwardedHeaders(new ForwardedHeadersOptions() { ForwardedHeaders = ForwardedHeaders.All }); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage();