Reputation: 14179
I have an application deployed on Azure and I'm trying to get the ip address of the remote client. Unfortunately I get always a value undefined when try to call
req.ip
Do you have any idea to get the ip address?
Upvotes: 1
Views: 4701
Reputation: 1484
const remoteAddress = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
Upvotes: 1