class ActionDispatch::RemoteIp

def call(env)

GetIp#calculate_ip method will calculate the memoized client IP address.
requests. For those requests that do need to know the IP, the
without calculating the IP to keep from slowing down the majority of
Since the IP address may not be needed, we store the object here
def call(env)
  req = ActionDispatch::Request.new env
  req.remote_ip = GetIp.new(req, check_ip, proxies)
  @app.call(req.env)
end