Mar 31, 2009 - 1 minutes

Rails remote IP address from behind a proxy

Since I have a cluster of 3 mongrels running behind lighttpd the usualy request.env[‘REMOTE_ADDR’] wasn’t working …

what ended up working was request.env[‘HTTP_X_FORWARDED_FOR’] to get the users IP

comments powered by Disqus