Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello! I am newbie and need help with Umbraco Forms. Using Magic String [@Remote_Addr] I get an IP encrypted by CloudFlare. How to get real IP?
https://developers.cloudflare.com/fundamentals/get-started/reference/http-request-headers/
try read CF-Connecting-IP or HTTPXFORWARDED_FOR headers
public static string GetIpAddress(this IHttpContextAccessor accessor) { if (!string.IsNullOrEmpty(accessor.HttpContext.Request.Headers["CF-CONNECTING-IP"])) return accessor.HttpContext.Request.Headers["CF-CONNECTING-IP"]; var ipAddress = accessor.HttpContext.GetServerVariable("HTTP_X_FORWARDED_FOR"); if (!string.IsNullOrEmpty(ipAddress)) { var addresses = ipAddress.Split(','); if (addresses.Length != 0) return addresses.Last(); } return accessor.HttpContext.Connection.RemoteIpAddress.ToString(); }
Thanks for the answer!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco Forms [@Remote_Addr]
Hello! I am newbie and need help with Umbraco Forms. Using Magic String [@Remote_Addr] I get an IP encrypted by CloudFlare. How to get real IP?
https://developers.cloudflare.com/fundamentals/get-started/reference/http-request-headers/
try read CF-Connecting-IP or HTTPXFORWARDED_FOR headers
Thanks for the answer!
is working on a reply...