Initialize @trusted_proxies.
This commit is contained in:
parent
eea61a030e
commit
dc37bd778a
@ -474,6 +474,7 @@ class RequestTest < ActiveSupport::TestCase
|
||||
|
||||
def stub_request(env = {})
|
||||
ip_spoofing_check = env.key?(:ip_spoofing_check) ? env.delete(:ip_spoofing_check) : true
|
||||
@trusted_proxies ||= nil
|
||||
ip_app = ActionDispatch::RemoteIp.new(Proc.new { }, ip_spoofing_check, @trusted_proxies)
|
||||
tld_length = env.key?(:tld_length) ? env.delete(:tld_length) : 1
|
||||
ip_app.call(env)
|
||||
|
Loading…
Reference in New Issue
Block a user