-
Notifications
You must be signed in to change notification settings - Fork 42
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
X-Forwarded-For not logged/honored in logs #25
Comments
Since I compile with Alternatively, you could use the same method to change the log format, to log the |
Thanks! I added:
mounted it within the container and it's working perfectly. Thank you very much! It might be a bit complex, but it would be awesome if there was an environment variable setting for that, so I could keep your "stock" nginx config and just say "accept forwarded headers from X". Maybe have something like:
And then that file is empty by default. Then folks can mount /etc/nginx/custom_server_options.conf and include their own config and still keep yours. |
While I preferred not to expand on options via env variables (there's so many for so may use cases, and I want to keep it simple), I might actually add the custom config file, never thought of using an empty one, thanks! |
I'm running the ':latest' release of the container, and I see that the logs show my reverse proxy (haproxy running on another host) as the source IPs. I have the following config in haproxy:
And the proxy logs still seem to show the proxy IP instead of the "real" IP. I confirmed the proxy is sending correct headers with tcpdump. Is there a setting I need to adjust to tell nginx to log those, or do I have to rebuild the container with the tweaked log configuration?
The text was updated successfully, but these errors were encountered: