Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use different HTTP headers other than X-Forwarded-For #94

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joerg-mi
Copy link

Dear all,

our web server is behind a proxy cascade. So the X-Forwarded-For header only delivers the ip address of the front end proxy but the ip address is in a different header (for example X-Remote-Client-IP). Changing the names is not possible for technical reasons outside my influence.

To deal with this I integrated a new option suhosin.log.remote-addr-header (with "HTTP_X_FORWARDED_FOR" as default). This option is only used if suhosin.log.remote-addr-header is enabled.

I decided to use the php style to reference headers. So you have to prepend HTTP_ and translate hyphens to underscores.

I also integrated a documented entry in the suhosin.ini and added some test scripts.

with kind regards,
Joerg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant