Fix reverse proxy whitelist to check proxy IP, not client IP
The whitelist should check the direct connecting IP (reverse proxy itself) rather than the end client IP from X-Forwarded-For headers. Changes: - Use req.connection.remoteAddress instead of X-Forwarded-For - Strip ::ffff: IPv6 prefix for IPv4-mapped addresses - Updated log message to clarify it's the proxy IP being checked - Updated docker-compose.yml comments to explain behavior This allows whitelisting the reverse proxy (e.g., 172.28.0.100) while still allowing any client IPs to reach the app through that proxy.pull/1163/head
parent
d692187eed
commit
229c7fcea6
Loading…
Reference in New Issue