I'm working on a plugin that gathers end user feedback on Wiki documentation and we need to temporarily capture the user's IP address in order to ascertain their country, and whether or not the IP address is internal to the organization or not.
Presently, I'm doing this:
While that works fine in my dev environment, in our staging environment, it's returning a 172.*.*.* private IP address. I know that sometimes if a request is being proxied through a load balancer or something, it will add the original IP address into the request header. What's the best way to obtain the original requester's IP address?