From 9ab462a9f6a541a951ed6e365a73e9c437f69136 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Fri, 14 May 2021 19:00:47 +0800 Subject: [PATCH] Get the client IP address from the reverse proxy --- .../RequestForwardedHeaderWebClientInfoProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.HttpOverrides/LINGYUN/Abp/AspNetCore/WebClientInfo/RequestForwardedHeaderWebClientInfoProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.HttpOverrides/LINGYUN/Abp/AspNetCore/WebClientInfo/RequestForwardedHeaderWebClientInfoProvider.cs index 9c2ae872b..3ef5dc6cf 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.HttpOverrides/LINGYUN/Abp/AspNetCore/WebClientInfo/RequestForwardedHeaderWebClientInfoProvider.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.AspNetCore.HttpOverrides/LINGYUN/Abp/AspNetCore/WebClientInfo/RequestForwardedHeaderWebClientInfoProvider.cs @@ -32,7 +32,7 @@ namespace LINGYUN.Abp.AspNetCore.WebClientInfo if (requestHeaders != null && requestHeaders.TryGetValue(Options.ForwardedForHeaderName, out StringValues headers) == true) { - if (StringValues.IsNullOrEmpty(headers)) + if (!StringValues.IsNullOrEmpty(headers)) { return headers.Last(); }