docker-bookstack icon indicating copy to clipboard operation
docker-bookstack copied to clipboard

[FEAT] Nginx log with real client IP

Open rochafabrizio opened this issue 1 year ago • 5 comments

Is this a new feature request?

  • [X] I have searched the existing issues

Wanted change

Bookstack container also provides a web server powered by nginx. However its access logs shows the ip address of the reverse proxies in front of it. It would be much better if there were a way to provide the trusted proxies, so nginx logs the client IP.

Reason for change

The way it is, nginx is logging the IP of reverse proxy in front of the docker, not the real client IP.

Proposed code change

No response

rochafabrizio avatar Oct 09 '24 19:10 rochafabrizio

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

github-actions[bot] avatar Oct 09 '24 19:10 github-actions[bot]

The container will already do this, the issue will be your host ke your proxy that is stripping that data. For example on Synology boxes you have to adjust iptables to enable it.

j0nnymoe avatar Oct 09 '24 20:10 j0nnymoe

Hi j0nnymoe, I noticed env var APP_PROXIES, don't know if thats what you mean, eitherway I'm setting it and it's only helping with Audit Log page. Please, let me know if there is any doc / article I can use. Thanks.

rochafabrizio avatar Oct 09 '24 21:10 rochafabrizio

Without knowing your setup, I'm just making assumptions but this was the specific thing I was speaking about for Synology https://www.pedrolamas.com/2020/11/04/exposing-the-client-ips-to-docker-containers-on-synology-nas/

j0nnymoe avatar Oct 09 '24 21:10 j0nnymoe

That worked for me. Hosting on Azure App Services, when I added the Env Variable "APP_PROXIES=*", I'm now getting client IPs in the audit log.

kristiandg avatar Oct 13 '24 13:10 kristiandg

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

LinuxServer-CI avatar Nov 13 '24 09:11 LinuxServer-CI

OP did not properly fill out the issue template and has stopped replying. closing.

drizuid avatar Jan 01 '25 16:01 drizuid