expressjs/morgan — pull request #45 by stonephp (2014-11-12 02:48:17+00:00)
Title: Update index.js get ip has a little wrong where web proxy.

Fixed getip function.
When nginx proxy to Node.js http.

location /api_v1/ {
proxy_pass http://127.0.0.1:8000/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Other way for the question.
Function getip allow redefined by user.