-
-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
mercure.error.log : Client IP wrong #114
Comments
The configuration can be similar to Symfony's one: https://symfony.com/doc/current/deployment/proxies.html#solution-settrustedproxies |
Great idea, I'm interested! |
Would you be interested on working on a patch? I can assist you if needed! |
Honestly, I have never worked with Golang and I have never created a patch. We can always try, with some help, and see :) |
I’m working on it. |
Thanks for the feedback. Maybe for next time (ça me laissera du temps pour jeter un œil sur Golang) |
It's ok for me. I have good datas with IPv4 and IPv6 in the logs. I pushed a pull request to update the README with good nginx parameters to use argument USE_FORWARDED_HEADERS=1. Thank you Kevin for the work ! |
Hello,
I am using Mercury behind a nginx proxy with the following configuration:
location / {
proxy_pass http://127.0.0.1:xxxx;
proxy_read_timeout 24h;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
Unfortunaly, in the logs file "mercure.error.log", the specified IP address is incorrect: client IP is always 127.0.0.1 :(
I tried to add parameters "proxy_set_header", but no success :
proxy_set_header Host $ host;
proxy_set_header X-Real-IP $ remote_addr;
proxy_set_header X-Forwarded-For $ proxy_add_x_forwarded_for;
Can you fix the problem to have the real IP addresses?
Merci par avance Kévin :)
The text was updated successfully, but these errors were encountered: