Merge pull request #1066 from Zert3x/master
Fix a typo
3 files changed, 3 insertions, 3 deletions
diff --git a/src/api/util/utility/ipAddress.ts b/src/api/util/utility/ipAddress.ts
index 172e9604..c51daf6c 100644
--- a/src/api/util/utility/ipAddress.ts
+++ b/src/api/util/utility/ipAddress.ts
@@ -102,7 +102,7 @@ export function getIpAdress(req: Request): string {
return (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
- req.headers[Config.get().security.forwadedFor] ||
+ req.headers[Config.get().security.forwardedFor] ||
req.socket.remoteAddress
);
}
diff --git a/src/gateway/events/Connection.ts b/src/gateway/events/Connection.ts
index 68273ace..1991ebbe 100644
--- a/src/gateway/events/Connection.ts
+++ b/src/gateway/events/Connection.ts
@@ -45,7 +45,7 @@ export async function Connection(
socket: WebSocket,
request: IncomingMessage,
) {
- const forwardedFor = Config.get().security.forwadedFor;
+ const forwardedFor = Config.get().security.forwardedFor;
const ipAddress = forwardedFor
? (request.headers[forwardedFor] as string)
: request.socket.remoteAddress;
diff --git a/src/util/config/types/SecurityConfiguration.ts b/src/util/config/types/SecurityConfiguration.ts
index 5e971cfe..35776642 100644
--- a/src/util/config/types/SecurityConfiguration.ts
+++ b/src/util/config/types/SecurityConfiguration.ts
@@ -28,7 +28,7 @@ export class SecurityConfiguration {
// header to get the real user ip address
// X-Forwarded-For for nginx/reverse proxies
// CF-Connecting-IP for cloudflare
- forwadedFor: string | null = null;
+ forwardedFor: string | null = null;
ipdataApiKey: string | null =
"eca677b284b3bac29eb72f5e496aa9047f26543605efe99ff2ce35c9";
mfaBackupCodeCount: number = 10;
|