diff --git a/.gitignore b/.gitignore index 0e724b6..5a7a730 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ dist/ node_modules/ npm-debug.log* .env -public/games/** \ No newline at end of file +public/games/** +exempt_masqr.txt \ No newline at end of file diff --git a/index.js b/index.js index bef53f4..943df1d 100644 --- a/index.js +++ b/index.js @@ -14,10 +14,18 @@ import { server as wisp, logging } from "@mercuryworkshop/wisp-js/server"; import router from "./middleware/ProxyExt/index.js"; import { handler as astroSSR } from "./dist/server/entry.mjs"; import cookies from "cookie-parser"; +import { existsSync, readFileSync } from "fs"; dotenv.config(); const whiteListedDomains = ["aluu.xyz", "localhost"]; + +if (existsSync("exempt_masqr.txt")) { + const file = readFileSync("exempt_masqr.txt", "utf-8"); + const exemptDomains = file.split("\n"); + whiteListedDomains.push(...exemptDomains); +} + const LICENSE_SERVER_URL = "https://license.mercurywork.shop/validate?license="; const MASQR_ENABLED = process.env.MASQR_ENABLED; logging.set_level(logging.WARN);