From d93e8ddbfd3b6658379d934232c8833991bd222b Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 17 Jun 2024 18:36:51 +0200 Subject: [PATCH] Correct header --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index d39a988..a62d504 100644 --- a/src/main.ts +++ b/src/main.ts @@ -178,7 +178,7 @@ export class Main { private fetchIp(request: http.IncomingMessage): IP2LocationResult { //see : https://github.com/kirsch33/realip/issues/14 - const ipAddress = request.headers['HTTP_X_FORWARDED_FOR'] + const ipAddress = request.headers['x-forwarded-for'] const db = ipAddress.match(Main.ipv4Regex) ? this.ipv4 : this.ipv6 return db.getAll(ipAddress) }