instance method
call
Ruby on Rails 7.1.6
Since v3.0.20Signature
call(env)
Since the IP address may not be needed, we store the object here without calculating the IP to keep from slowing down the majority of requests. For those requests that do need to know the IP, the GetIp#calculate_ip method will calculate the memoized client IP address.
Parameters
-
envreq
Source
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 89
def call(env)
req = ActionDispatch::Request.new env
req.remote_ip = GetIp.new(req, check_ip, proxies)
@app.call(req.env)
end
Defined in actionpack/lib/action_dispatch/middleware/remote_ip.rb line 89
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::RemoteIp