method
new
v3.2.1 -
Show latest stable
- Class:
ActionDispatch::RemoteIp
new(app, check_ip_spoofing = true, custom_proxies = nil)public
No documentation available.
# 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