You can reference that as cgi.http_x_forwarded_for -- and it will come back
blank if not there, and with a list of IPs otherwise.
Yes, any CGI variable will also return blank when directly referenced and not
available.
So I supposed you could do something in your onrequest that if it exists
So we wound up just doing a replace/find to use this function instead
of the cgi.remote_addr everywhere.
Byron, this is basically the same code I've written. However, in other forums
I've seen discussion of the X-FORWARDED-FOR header being seamlessly translated
into REMOTE_ADDR by Tomcat. The
An update:
It appears this is now possible with Apache by using mod_remoteip (link below).
Unfortunately for me, at this time, it's only available for version 2.4 (the
most recent) which is not yet available for Windows. But, Linux guys, it looks
you're in luck.
in IIS you can create custom headers and I think populate them with value
of other headers, so if your on IIS you could try this.
--
Russ Michaels
www.bluethunderinternet.com : Business hosting services solutions
www.cfmldeveloper.com: ColdFusion developer community
Hey, all. Thanks in advance for the info on this. I realize it's not a
straight-up CF question, but my search for answers has come up empty thus far.
Hoping someone here will have the last piece of the puzzle.
We're running our CF servers (using JRun and Apache) behind a load balancer,
and as
You can reference that as cgi.http_x_forwarded_for -- and it will come back
blank if not there, and with a list of IPs otherwise.
So I supposed you could do something in your onrequest that if it exists
replaces cgi.remote_addr -- but that's not going to help you if it returns
multiple IPs. (We
Load balancers are going to probably act a bit different from one to
another as well.
For instance, we use a CoyotePoint with SSL off-loading. Http
requests wind up not even having a X-Forwarded-For value, so the code
below only works for us for SSL requests.
For http request, the
7 matches
Mail list logo