refactor(backend): replace private-ip with ipaddr.js (#11041)
* refactor(backend): replace private-ip with ipaddr.js * restore ip-cidr
This commit is contained in:
parent
5d922e3084
commit
a2c0573f84
4 changed files with 17 additions and 36 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import IPCIDR from 'ip-cidr';
|
||||
|
||||
export function getIpHash(ip: string) {
|
||||
export function getIpHash(ip: string): string {
|
||||
try {
|
||||
// because a single person may control many IPv6 addresses,
|
||||
// only a /64 subnet prefix of any IP will be taken into account.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue