Ruby on Rails Friday, February 25, 2011

On Feb 25, 2011, at 8:31 AM, Phoenix Rising wrote:

> Try changing HTTP_X_FORWARDED_FOR to REMOTE_ADDR. The second one of
> those is what will give you the user's IP address. Bear in mind that
> if they're behind a proxy, you'll get the IP address of that proxy
> instead of theirs, but then again, that's one of the points of their
> using a proxy to begin with :-)


I just ran afoul of this when trying to pay my insurance bill. The
poorly-written sniffer on the insurance company's national /paybill
page looked up my IP, and discovered I'm in New York (I'm actually
near Philadelphia) and redirected me to a "sorry, we don't do business
in your area" page. My T1 must route through New York, I guess.
Luckily Google was able to find the real payment page.

Walter

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment