Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

correct forwarded-for header

  • Loading branch information...
commit 7f0df1746a184326e2ed58467bbb05938f221e3a 1 parent 5b16243
Gibheer Gibheer authored
2  lib/zero/request/client.rb
View
@@ -5,7 +5,7 @@ class Client
# the key for the ip of the client
KEY_REMOTE_ADDR = 'REMOTE_ADDR'
# in proxy setups, this is the real address of the client
- KEY_FORWARDED_FOR = 'X_FORWARDED_FOR'
+ KEY_FORWARDED_FOR = 'HTTP_X_FORWARDED_FOR'
# the key for the hostname
KEY_REMOTE_HOST = 'REMOTE_HOST'
# the key for the user agent
2  spec/unit/zero/request/client/address_spec.rb
View
@@ -16,7 +16,7 @@
let(:env) do
{
'REMOTE_ADDR' => proxy,
- 'X_FORWARDED_FOR' => address
+ 'HTTP_X_FORWARDED_FOR' => address
}
end
Please sign in to comment.
Something went wrong with that request. Please try again.