mirror of
https://github.com/cmur2/dyndnsd.git
synced 2025-07-05 05:11:16 +02:00
Allow dyndnsd to use address from X-Real-IP
This commit is contained in:
@ -166,4 +166,11 @@ describe Dyndnsd::Daemon do
|
||||
last_response.should be_ok
|
||||
last_response.body.should == 'good 127.0.0.1'
|
||||
end
|
||||
|
||||
it 'uses clients remote IP address from X-Real-IP header if behind proxy' do
|
||||
authorize 'test', 'secret'
|
||||
get '/nic/update?hostname=foo.example.org', '', 'HTTP_X_REAL_IP' => '10.0.0.1'
|
||||
last_response.should be_ok
|
||||
last_response.body.should == 'good 10.0.0.1'
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user