Update index.js get ip has a little wrong where web proxy.

Fixed getip function. 
When nginx proxy to Node.js http.

<pre>
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;
}
</pre>


Other way for the question.
Function getip allow redefined by user.