From 7c3ce74a3b828ee0f2037af922dd7e88e202cda2 Mon Sep 17 00:00:00 2001 From: zhangqi <2794379662@qq.com> Date: Fri, 26 Feb 2021 10:31:47 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=20configure=20=E4=B8=8D=E8=83=BDDI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QRCodeService/Startup.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/QRCodeService/Startup.cs b/QRCodeService/Startup.cs index 1ad8655..fadb66f 100644 --- a/QRCodeService/Startup.cs +++ b/QRCodeService/Startup.cs @@ -92,7 +92,7 @@ namespace QRCodeService } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ServiceOption option) + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { @@ -100,11 +100,7 @@ namespace QRCodeService app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "QRCodeService v1")); } - if (option.IsForwarded) - { - app.UseForwardedHeaders(); - } - + app.UseForwardedHeaders(); app.UseRouting(); app.UseAuthorization();