-
Notifications
You must be signed in to change notification settings - Fork 213
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
Unable to extract public IP address from header 'HTTP_X_FORWARDED_FOR' #1653
Comments
My quick and dirt hack, just in case somebody else is interested: Edit
And edit below piece of code:
|
Hello, it seems that this header wasn't parsed correctly. Thanks for the feedback! Regards |
…for the feedback. Closes nuxsmin#1653 Signed-off-by: Rubén D <[email protected]>
Hello, Please can you re-open this issue. The name of the header in php is "HTTP_X_FORWARDED_FOR" however the header itself is "X_FORWARDED_FOR" without the "HTTP_". This is what is causing the issue. The php function used in /var/www/html/sysPass/lib/SP/Http/Request.php should be changed from this:
to this:
Kind regards, |
sysPass Version
Describe the bug
The application is not taking IP address from header 'HTTP_X_FORWARDED_FOR'
To Reproduce
Expected behavior
See IP extracted from header 'HTTP_X_FORWARDED_FOR' in the logs
Found behavior
I can see the private IP from the load balancer (in this case traefik)
Screenshots
N/A
Event log
N/A
Platform (please complete the following information):
Additional context
I know that I can replace the logged IP at apache level, but I need to set the IP to features like:
So far I'm looking at function
getForwardedFor()
inlib/SP/Http/Request.php
.Many thanks to all the people involved in this project for their time.
Cheers.
The text was updated successfully, but these errors were encountered: