From d340be4e2cfecd095c79d9a2d3729e133ce8ab19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=85=86=E9=91=AB?= Date: Mon, 27 Oct 2025 20:23:34 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=B0=83=E6=95=B4authserver=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1https=E4=BB=A3=E7=90=86=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../KonSoft.AuthServer/KonSoftAuthServerModule.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/applications/KonSoft.AuthServer/KonSoftAuthServerModule.cs b/applications/KonSoft.AuthServer/KonSoftAuthServerModule.cs index b74e01a..f9eb100 100644 --- a/applications/KonSoft.AuthServer/KonSoftAuthServerModule.cs +++ b/applications/KonSoft.AuthServer/KonSoftAuthServerModule.cs @@ -58,6 +58,8 @@ public class KonSoftAuthServerModule : AbpModule context.Services.Configure(options => { + options.KnownNetworks.Clear(); + options.KnownProxies.Clear(); options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; }); @@ -137,18 +139,19 @@ public class KonSoftAuthServerModule : AbpModule var app = context.GetApplicationBuilder(); var env = context.GetEnvironment(); - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - app.UseForwardedHeaders(); - } - else + if (!env.IsDevelopment()) { app.UseErrorPage(); app.UseForwardedHeaders(); app.UseHsts(); } + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + app.UseForwardedHeaders(); + } + app.UseAbpRequestLocalization(); app.UseCorrelationId();