instance method
local_request?
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
local_request?()
True if the request came from localhost, 127.0.0.1. Override this method if you wish to redefine the meaning of a local request to include remote IP addresses or other criteria.
Source
# File actionpack/lib/action_controller/rescue.rb, line 124
def local_request? #:doc:
LOCALHOST.any?{ |local_ip| request.remote_addr =~ local_ip && request.remote_ip =~ local_ip }
end
Defined in actionpack/lib/action_controller/rescue.rb line 124
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Rescue