class method
self.new
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
self.new(app, check_ip_spoofing = true, custom_proxies = nil)
No documentation comment.
Parameters
-
appreq -
check_ip_spoofingopt = true -
custom_proxiesopt = nil
Source
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 18
def initialize(app, check_ip_spoofing = true, custom_proxies = nil)
@app = app
@check_ip = check_ip_spoofing
if custom_proxies
custom_regexp = Regexp.new(custom_proxies)
@proxies = Regexp.union(TRUSTED_PROXIES, custom_regexp)
else
@proxies = TRUSTED_PROXIES
end
end
Defined in actionpack/lib/action_dispatch/middleware/remote_ip.rb line 18
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::RemoteIp