How request-ip determines the client IP
masterThe module determines the user's IP by checking specific request headers in a prioritized order. If no IP can be found, it returns null.
The lookup order is:
X-Client-IPX-Forwarded-For(Takes the first IP in a comma-separated list)CF-Connecting-IP(Cloudflare)Fastly-Client-Ip(Fastly CDN and Firebase hosting)True-Client-Ip(Akamai and Cloudflare)X-Real-IP(Nginx proxy/FastCGI)X-Cluster-Client-IP(Rackspace LB, Riverbed Stingray)X-Forwarded,Forwarded-ForandForwarded(Variations of #2)appengine-user-ip(Google App Engine)req.connection.remoteAddressreq.socket.remoteAddressreq.connection.socket.remoteAddressreq.info.remoteAddressCf-Pseudo-IPv4(Cloudflare fallback)request.raw(Fastify)