feat: add trust proxy support for correct IP logging behind reverse proxies (v2.7.6)

- Add TRUST_PROXY environment variable to enable proxy header trust
- Configure Express trust proxy in both HTTP server implementations
- Fix issue #19: Docker internal IPs logged instead of real client IPs
- Update documentation with reverse proxy configuration guide
- Add examples for nginx proxy header forwarding
- Maintain backward compatibility (disabled by default)

When TRUST_PROXY=1 is set, the server will correctly log client IPs
from X-Forwarded-For headers instead of proxy/container IPs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-07-06 20:20:06 +02:00
parent 2a5c4ec6eb
commit 657d8c6088
6 changed files with 69 additions and 3 deletions

View File

@@ -53,6 +53,12 @@ AUTH_TOKEN=your-secure-token-here
# For production, set to your specific domain
# CORS_ORIGIN=https://your-client-domain.com
# Trust proxy configuration for correct IP logging (0=disabled, 1=trust first proxy)
# Set to 1 when running behind a reverse proxy (Nginx, Traefik, etc.)
# Set to the number of proxy hops if behind multiple proxies
# Default: 0 (disabled)
# TRUST_PROXY=0
# =========================
# N8N API CONFIGURATION
# =========================