From b8a25b3b523c8075ae94871b3860a3a005a9af12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=85=86=E9=91=AB?= Date: Sat, 25 Oct 2025 23:27:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0UseForwardedHeaders?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BB=A5=E6=94=AF=E6=8C=81XForwardedFor?= =?UTF-8?q?=E5=92=8CXForwardedProto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/KonSoft.AuthServer/KonSoftAuthServerModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applications/KonSoft.AuthServer/KonSoftAuthServerModule.cs b/applications/KonSoft.AuthServer/KonSoftAuthServerModule.cs index 33e8310..800a7a8 100644 --- a/applications/KonSoft.AuthServer/KonSoftAuthServerModule.cs +++ b/applications/KonSoft.AuthServer/KonSoftAuthServerModule.cs @@ -152,7 +152,10 @@ public class KonSoftAuthServerModule : AbpModule app.UseDeveloperExceptionPage(); } - app.UseForwardedHeaders(); + app.UseForwardedHeaders(new ForwardedHeadersOptions + { + ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto + }); app.UseAbpRequestLocalization(); if (!env.IsDevelopment())