diff --git a/src/main.ts b/src/main.ts index 9945eb7..6cbb2b5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -190,9 +190,10 @@ export class Main { //see : https://github.com/kirsch33/realip/issues/14 const ipAddress = request.headers['x-forwarded-for'] const db = ipAddress.match(Main.ipv4Regex) ? this.ipv4 : this.ipv6 - const result = db.getAll(ipAddress) + const result: IP2LocationResult = db.getAll(ipAddress) for (const k in result) { if (!this.keysSet.has(k)) { + // @ts-ignore delete result[k] } }