1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Do not use a local network ip as HTTP_X_FORWARDED_FOR header

If HTTP_X_FORWARDED_FOR is a local network IP the HTTP_CLIENT_IP
need to be set
This commit is contained in:
Rafael Mendonça França 2012-01-10 11:43:15 -03:00
parent ead414d0a7
commit d699b80254

View file

@ -40,7 +40,7 @@ class TrackableHooksTest < ActionController::IntegrationTest
test "current remote ip returns original ip behind a non transparent proxy" do
user = create_user
arbitrary_ip = '192.168.1.69'
arbitrary_ip = '200.121.1.69'
sign_in_as_user do
header 'HTTP_X_FORWARDED_FOR', arbitrary_ip
end