From 326c11b95c5f4ce58014d0f7dc173c53fa5ccb32 Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Thu, 17 Nov 2022 21:21:20 +1100 Subject: [PATCH] Close #503 attach ip version to cloak --- lib/middleware/ip/processip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/middleware/ip/processip.js b/lib/middleware/ip/processip.js index ac1f8a24..fa1b0e0a 100644 --- a/lib/middleware/ip/processip.js +++ b/lib/middleware/ip/processip.js @@ -38,7 +38,7 @@ module.exports = (req, res, next) => { qrange = createCIDR(ipStr, 64).toString(); hrange = createCIDR(ipStr, 48).toString(); } - const cloak = `${hashIp(hrange).substring(0,8)}.${hashIp(qrange).substring(0,7)}.${hashIp(ipStr).substring(0,7)}.IP`; + const cloak = `${hashIp(hrange).substring(0,8)}.${hashIp(qrange).substring(0,7)}.${hashIp(ipStr).substring(0,7)}.IP${ipKind.charAt(3)}`; res.locals.ip = { raw: dontStoreRawIps === true ? cloak : ipStr, cloak,