Permalink
Browse files

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
  • Loading branch information...
1 parent ead414d commit d699b802540430e4d0749ca46e285c28eb4d3dac @rafaelfranca rafaelfranca committed Jan 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/integration/trackable_test.rb
@@ -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

0 comments on commit d699b80

Please sign in to comment.