express req.ip ::1 code example Example: express req ip address const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;