I want to get ip of the client. I run my node app(express) with this:
var ip = request.ip
var ip = request.headers['x-forwarded-for']
'x-forwarded-for' is set when the request pass through an HTTP proxy or load balancer. This field contains identifies the node making the request to the proxy. You can see the IETF RFC 7239.
"by" identifies the user-agent facing interface of the proxy.
"for" identifies the node making the request to the proxy.
"host" is the host request header field as received by the proxy.
"proto" indicates what protocol was used to make the request.
request.ip is derived from the left-most entry in the X-Forwarded-For, so its the original ip address of the request. Express doc.