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