ngingx proxy express get real ip
snippet in javascript

ngingx proxy express get real ip

user3986

1) app.set('trust proxy', true) in your Express app.
2) Add proxy_set_header X-Forwarded-For $remote_addr in
  the Nginx configuration for your server block.
// sudo nano /etc/nginx/sites-available/default