add note on why we use ipaddr.process instead of ipaddr.parse
This commit is contained in:
+1
-1
@@ -209,7 +209,7 @@ function isIpAllowedSync(token, ip) {
|
||||
assert.strictEqual(typeof token, 'object');
|
||||
assert.strictEqual(typeof ip, 'string');
|
||||
|
||||
const parsedIp = ipaddr.process(ip);
|
||||
const parsedIp = ipaddr.process(ip); // will demangle IPv4-mapped IPv6
|
||||
|
||||
let allowedIpRanges = gParsedRangesCache.get(token.id); // returns undefined if not found
|
||||
if (!allowedIpRanges) {
|
||||
|
||||
Reference in New Issue
Block a user