instance method
remote_ip
Ruby on Rails 5.2.8.1
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 278
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 278
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Request