diff --git a/index.js b/index.js index 302836d..d91a201 100644 --- a/index.js +++ b/index.js @@ -13,7 +13,7 @@ if (!fs.existsSync("./blacklist.json")) { } app.use((req, res, next) => { // Blacklist handler - let blacklist = require("./blacklist.json"); // Get it every time to update it + const blacklist = JSON.parse(fs.readFileSync("./blacklist.json", "utf-8")); if (blacklist.includes(req.ip)) { console.log(`[${new Date().toLocaleString()}] ${req.ip} ${req.method} ${req.url} - Blacklisted`); return res.status(403).json({