req.ip shows reverse proxy address instead of client IP in production
Assumes Express 4.x. An Express application returns the direct client socket address for req.ip during local development, but the same code behind a production reverse proxy reports the proxy address when app.set('trust proxy') remains at its default of false . Enabling trust proxy changes req.ip , req.ips , and req.protocol based on X-Forwarded-For and X-Fo