0
0
Fork 0

correct forwarded-for header

This commit is contained in:
Gibheer 2014-03-05 10:06:07 +01:00
parent 5b16243973
commit 7f0df1746a
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ module Zero
# 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

View File

@ -16,7 +16,7 @@ describe Zero::Request::Client, '#address' do
let(:env) do
{
'REMOTE_ADDR' => proxy,
'X_FORWARDED_FOR' => address
'HTTP_X_FORWARDED_FOR' => address
}
end