diff --git a/index.js b/index.js index e821d5a..b83a839 100644 --- a/index.js +++ b/index.js @@ -16,7 +16,7 @@ import cookies from "cookie-parser" dotenv.config(); -const whiteListedDomains = ["aluu.xyz"]; +const whiteListedDomains = ["aluu.xyz", "localhost"]; const LICENSE_SERVER_URL = "https://license.mercurywork.shop/validate?license="; const MASQR_ENABLED = process.env.MASQR_ENABLED; diff --git a/middleware/Masqr/index.js b/middleware/Masqr/index.js index 1fd0ce9..bba6fb6 100644 --- a/middleware/Masqr/index.js +++ b/middleware/Masqr/index.js @@ -4,7 +4,7 @@ export async function masqrCheck(config, htmlFile) { try { const loadedHTMLFile = fs.readFileSync(htmlFile, "utf8"); return async (req, res, next) => { - if (config.whitelist.includes(req.headers.host) || req.headers.host.includes("localhost")) { + if (config.whitelist.includes(req.hostname)) { next(); return; }