Created
May 10, 2015 16:49
-
-
Save luxxi/0154a3fbf7f805a0aad7 to your computer and use it in GitHub Desktop.
Get user ip on heroku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request.env["HTTP_X_FORWARDED_FOR"].try(:split, ',').try(:first) || request.env["REMOTE_ADDR"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment