mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 22:57:12 +01:00
Ensure comparaison of same CIDR IP version
This commit is contained in:
parent
ae7186c32a
commit
5bc72dcb99
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ export default async (req, res) => {
|
||||||
const addr = ipaddr.parse(ip);
|
const addr = ipaddr.parse(ip);
|
||||||
const range = ipaddr.parseCIDR(i);
|
const range = ipaddr.parseCIDR(i);
|
||||||
|
|
||||||
if (addr.match(range)) return true;
|
if (addr.kind() === range[0].kind() && addr.match(range)) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue