instance method
local?
Ruby on Rails 5.2.8.1
Since v3.0.20Signature
local?()
True if the request came from localhost, 127.0.0.1, or ::1.
Source
# File actionpack/lib/action_dispatch/http/request.rb, line 404
def local?
LOCALHOST =~ remote_addr && LOCALHOST =~ remote_ip
end
Defined in actionpack/lib/action_dispatch/http/request.rb line 404
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Request