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

Containerized restsql service and tomcat logs show nginx proxy IP rather than client IP #78

Open
restsql opened this issue Mar 27, 2017 · 0 comments
Labels

Comments

@restsql
Copy link
Owner

restsql commented Mar 27, 2017

On restsql.org, we have nginx in front of the service+sdk. The nginx container is on the bridge network, at 172.17.0.4. It forwards request to the restsql container at 172.17.0.3. All tomcat access logs and restsql service logs are showing 172.17.0.4 as the client request IP, rather than the real requester IP.

Looks like there is an easy solution for tomcat: http://serverfault.com/questions/514551/make-tomcat-use-x-real-ip/692604. nginx proxy location block needs an update with a couple headers.

restsql's org.restsql.service.HttpRequestHelper needs to change to look at the X-Real-IP and/or X-Forwarded-For header.

@restsql restsql added the bug label Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant