Skip to content
Snippets Groups Projects
Commit 1eca628e authored by Konstantin Krauss's avatar Konstantin Krauss
Browse files

Support for HTTP_X_REAL_IP

parent 22d3fc19
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,11 @@ module Geocoder
def location
unless defined?(@location)
@location = Geocoder.search(ip).first
if env.has_key?('HTTP_X_REAL_IP')
@location = Geocoder.search(env['HTTP_X_REAL_IP']).first
else
@location = Geocoder.search(ip).first
end
end
@location
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment