Dump the CGI scope and you should see it in there.
For example, with the loadbalancers we use, we have the x_forwarded_for and x_real_ip header sent through with the request. This way we can access it with CGI.HTTP_X_Forwarded_For.
You will probably see it using the GetHttpRequestData() function too. This gets the HTTP request information, which contains the headers, which should have the part in your are looking for.
Hi haxtbh, thanks for the answer. I think I didn't explain it very well. We're already using the GetHttpRequestData() to get the "Client-IP" variable configured in the Netscaler, and we can then use this to insert into audit logs etc.
However, we want to enable ColdFusion debugging through the administrator, and this works off a list of IP addresses. This appears to work off REMOTE_ADDR (?) and doesn't seem to be configurable to work elsewhere.
So, if I access my page without the Netscaler then the debug information appears as my IP address is correct. However, if I access it through the Netscaler it does not, as my REMOTE_ADDR is now that of the Netscaler.
Did you find a solution? We have the same issue in a reverse proxy environment.