Issue with ConnInfo
I'm trying to use const info = getConnInfo(c)
To get the ip adress of the user for ratelimiting, but when I do console.log(info) I get this wrong ip:
{
remote: { address: '::ffff:172.18.0.1', port: 56124, addressType: 'IPv6' }
}
What could be the cause and how would I fix that?
Thanks in advance
6 Replies
Using this
I'm hosting it in pterodactyl nodejs container
Also passes trough nginx proxy manager. No cloudflare proxy
Anybody got any ideas?
is your only concern RE the IP the "empty" colons? it looks like that might be ok: https://stackoverflow.com/a/33790357
Stack Overflow
Express.js req.ip is returning ::ffff:127.0.0.1
I am currently trying to get the IP of the requested user. The problem is the IP is returning ::ffff:127.0.0.1 instead of 127.0.0.1. I tried using trusted proxy option (though not using a proxy) an...
I would like to get the user's IP not just 127.0.0.1
the example you gave was
if you're expecting a different IP, and you're using docker compose, this may help?
https://stackoverflow.com/questions/73470274/how-can-i-access-forward-the-public-http-request-ip-address-inside-a-docker-co
Stack Overflow
How can I access (forward) the public HTTP request IP address insid...
With the following setup:
only the YARP container has published ports. It correctly sets the X-Forward* headers for other containers to use. But unfortunately it's the docker compose gateway addre...