module Geocoder::Request
def safe_location
corresponding to the original client IP for any request sent
not the original client IP. You WILL NOT get the location
location for the IP of the last untrusted proxy in the chain,
whitelisted as trusted in your Rack config, you will get the
For requests that go through a proxy that you haven't
This safe_location() protects you from trivial IP spoofing.
def safe_location @safe_location ||= Geocoder.search(ip, ip_address: true).first end