impressionist icon indicating copy to clipboard operation
impressionist copied to clipboard

Possibility to overwrite ip_address

Open marcusg opened this issue 11 years ago • 2 comments

Hey guys!

I have a unicorn/nginx setup in production env and all my impression records have the same ip-address 127.0.0.1. Is it possible to overwrite the ip_address in the controller hash?

:ip_address => request.headers["X-Real-IP"]

instead of

:ip_address => request.remote_ip 

thanks!

marcusg avatar Oct 25 '13 09:10 marcusg

Yes I'm seeing the same thing. Any ideas?

kidbombay avatar Jan 08 '14 17:01 kidbombay

It's not currently possible but it shouldn't be too hard to add support for it. A PR is more than welcome.

I am currently having the same issue where remote_ip is the IP of cloudflare even though it seems rails should be able to pick the X-Forwarded-For header value for remote_ip but it might be the combination with Heroku and SSL termination. I'm looking into something like https://github.com/metavida/remote_ip_proxy_scrubber though as I am guessing other parts of my rails app are also affected...

jgrau avatar Aug 08 '17 14:08 jgrau