instance method
local?
Ruby on Rails 8.0.4
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 468
def local?
LOCALHOST.match?(remote_addr) && LOCALHOST.match?(remote_ip)
end
Defined in actionpack/lib/action_dispatch/http/request.rb line 468
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Request