Policy evaluation: IPV4 mapped as IPV6 addresses need to be converted
rahulreddy opened this issue · 0 comments
rahulreddy commented
Since nodejs server listen's to ipv4 and ipv6 addresses on the same socket, net.Socket.remoteAddress
gives us an ipv4 address in ipv6 format like ::ffff:127.0.0.1
. This needs to be converted to ipv4 if the policy evaluation condition is specified in ipv4.
https://github.com/whitequark/ipaddr.js seems to be a good module to accomplish that replacing the current node-ip
module.