Merge pull request #1066 from Zert3x/master

Fix a typo
This commit is contained in:
Madeline 2023-06-14 18:30:16 +10:00 committed by GitHub
commit bf079ffa7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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
);
}

View File

@ -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;

View File

@ -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;