Another thing with this is if I put my (real) IP address on CF Admin to show debugging
on the website it is checks my cgi.REMOTE_ADDR which is not the same.
To see debugging I have to add the REMOTE_ADDR (proxy IP) to the debugging list to see
what I want.
The downside of this is that there may be many other people using the same proxy and
therefore can see the debugging. 8-((
Allan
----- Original Message -----
From: Allan Cliff
To: CF - List
Sent: Friday, March 28, 2003 10:42 AM
Subject: [ cf-dev ] CGI variables in debugging
HTTP_X_FORWARDED_FOR and REMOTE_ADDR
I have asked this before but with no reply.
When doing IP logging and restricted access to control panels / files etc I ask
people to register their IP.
Now what a person thinks their IP is may not always be the same as REMOTE_ADDR as
sometimes proxies are used a nd the REAL IP is in the variable HTTP_X_FORWARDED_FOR.
Any comments on how anyone has got around this?
If I say
<CFIF IsDefined("HTTP_X_FORWARDED_FOR")><CFSET ClientIP = HTTP_X_FORWARDED_FOR>
<CFELSE><CFSET ClientIP = REMOTE_ADDR>
</CFIF>
do you think there will be any problems?
Thanks
Allan