Skip to content

Commit

Permalink
restore ip-cidr
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Jun 24, 2023
1 parent b532310 commit 975cc20
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"happy-dom": "9.20.3",
"hpagent": "1.2.0",
"ioredis": "5.3.2",
"ip-cidr": "3.1.0",
"ipaddr.js": "2.1.0",
"is-svg": "4.3.2",
"js-yaml": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/misc/get-ip-hash.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
27 changes: 27 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 975cc20

Please sign in to comment.