Attempt to fix build
This commit is contained in:
parent
43410244e8
commit
6d69eb12b9
1 changed files with 2 additions and 1 deletions
|
|
@ -190,9 +190,10 @@ export class Main {
|
||||||
//see : https://github.com/kirsch33/realip/issues/14
|
//see : https://github.com/kirsch33/realip/issues/14
|
||||||
const ipAddress = <string>request.headers['x-forwarded-for']
|
const ipAddress = <string>request.headers['x-forwarded-for']
|
||||||
const db = ipAddress.match(Main.ipv4Regex) ? this.ipv4 : this.ipv6
|
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) {
|
for (const k in result) {
|
||||||
if (!this.keysSet.has(k)) {
|
if (!this.keysSet.has(k)) {
|
||||||
|
// @ts-ignore
|
||||||
delete result[k]
|
delete result[k]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue