i want get a remote clients ip, so i used express req.ip but i only getting :ffff:127.0.0.1
so i used x-forwarded-for but i only getting weird string
req.headers[âx-forwarded-forâ] || req.connection.remoteAddress
Just a reminder that if youâre going to be storing IP addresses from people who visit your site, youâll also need to think about security measures for keeping that data safe!
Also worth mentioning that IP Addresses are considered to be personal data, personal data should be well protected! https://gdpr-info.com/dynamic-ip-addresses-personal-data/
The ruling means that data owners may need to tighten up even further their consent policies on websites.
1 Like
The âweird stringâ you are talking about is likely a IPv6 address, this is totally normal since the world is running out of IPv4 addresses. Some ISPs handout IPv6 addresses whilst others hand out IPv4 addresses.
1 Like