diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-06-14 18:30:16 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-14 18:30:16 +1000 |
commit | bf079ffa7a6211ee7387cf2c4f446d769a88fb5c (patch) | |
tree | 33b5389bc40e03943e118cbbc959d046a23c212a /src | |
parent | Merge pull request #1069 from ngn13/pass_length_check (diff) | |
parent | Update Connection.ts (diff) | |
download | server-bf079ffa7a6211ee7387cf2c4f446d769a88fb5c.tar.xz |
Merge pull request #1066 from Zert3x/master
Fix a typo
Diffstat (limited to 'src')
-rw-r--r-- | src/api/util/utility/ipAddress.ts | 2 | ||||
-rw-r--r-- | src/gateway/events/Connection.ts | 2 | ||||
-rw-r--r-- | src/util/config/types/SecurityConfiguration.ts | 2 |
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; |