Created — forked from lzyy/gist:917307

Embed URL


SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

node js get client ip

View gist:987455
1 2 3
function getClientAddress(req) {
return req.headers['x-forwarded-for'] || req.connection.remoteAddress;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.