instance method
remote_ip
Ruby on Rails 8.1.2
Since v3.0.20Signature
remote_ip()
Returns the IP address of client as a String, usually set by the RemoteIp middleware.
Source
# File actionpack/lib/action_dispatch/http/request.rb, line 317
def remote_ip
@remote_ip ||= (get_header("action_dispatch.remote_ip") || ip).to_s
end
Defined in actionpack/lib/action_dispatch/http/request.rb line 317
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Request