diff --git a/src/Pandatech.ModularMonolith.SharedKernel/Helpers/HttpContextParser.cs b/src/Pandatech.ModularMonolith.SharedKernel/Helpers/HttpContextParser.cs index 1a1cfe6..0801055 100644 --- a/src/Pandatech.ModularMonolith.SharedKernel/Helpers/HttpContextParser.cs +++ b/src/Pandatech.ModularMonolith.SharedKernel/Helpers/HttpContextParser.cs @@ -89,7 +89,8 @@ public static string TryParseUserAgent(this HttpContext httpContext) "X-Forwarded-Host", "X-Forwarded-Proto", "X-Forwarded-Server", - "X-Forwarded-Port" + "X-Forwarded-Port", + "CF-Connecting-IP" }; var stringBuilder = new StringBuilder(); @@ -166,7 +167,7 @@ public static decimal TryParseAccuracy(this HttpContext httpContext) public static string TryParseUserNetworkAddress(this HttpContext httpContext) { - string[] headersToCheck = ["X-Forwarded-For", "Forwarded", "X-Real-IP"]; + string[] headersToCheck = ["CF-Connecting-IP", "X-Forwarded-For", "Forwarded", "X-Real-IP"]; foreach (var header in headersToCheck) {