pbojinov / request-ip

A Node.js module for retrieving a request's IP address on the server.
https://npmjs.com/package/request-ip
MIT License
830 stars 102 forks source link

::ffff:127.0.0.1 Address from client on same VPN as application #56

Closed juzimmer closed 2 years ago

juzimmer commented 2 years ago

So I have an application living on server that is on the same VPN as the clients. No matter what I do to get the VPN Local IP of the client hitting the server, it always comes back as ::ffff:127.0.0.1. Any thoughts ?

juzimmer commented 2 years ago

You can close this. I figured out it was actually the NGINX server block that needed

proxy_set_header X-Forwarded-For $remote_addr;