diff --git a/src/connector/websocketIncoming.ts b/src/connector/websocketIncoming.ts index 1ac355f..efa97e0 100644 --- a/src/connector/websocketIncoming.ts +++ b/src/connector/websocketIncoming.ts @@ -6,7 +6,6 @@ import logging from "../util/Logging"; import { readFileSync } from "fs"; import { createServer } from "https"; import { createServer as createInsecureServer } from "http"; -import { ValidKeys } from "../util/ValidKeys"; import { DatabaseConnector, KeyValidity, ValidityReasons } from "./databaseConnector"; import { isCompatibleVersion } from "../util/CompatibleClients"; const Log = logging("WebsocketIncoming"); @@ -134,7 +133,7 @@ export class WebsocketIncoming { private async isValidKey(key: string) : Promise { if (process.env.REQUIRE_AUTH_KEY === "false") return { valid: true, reason: ValidityReasons.VALID }; - if (ValidKeys.includes(key)) return { valid: true, reason: ValidityReasons.VALID }; + if (process.env.AUTH_KEY === key) return { valid: true, reason: ValidityReasons.VALID }; let validity: KeyValidity = { valid: false, reason: ValidityReasons.INVALID }; if (process.env.USE_BACKEND === "true") { diff --git a/src/util/ValidKeys.ts b/src/util/ValidKeys.ts deleted file mode 100644 index 50f56a3..0000000 --- a/src/util/ValidKeys.ts +++ /dev/null @@ -1 +0,0 @@ -export const ValidKeys = ["DEBUG_REMOVE_ME"]; // Add keys valid for auth here \ No newline at end of file