diff --git a/svr.js b/svr.js index f27a915..35e8770 100644 --- a/svr.js +++ b/svr.js @@ -1153,7 +1153,7 @@ if (fs.existsSync(__dirname + "/config.json")) { // Default server configuration properties var wwwredirect = false; -var rawBlackList = []; +var rawBlockList = []; var users = []; var page404 = "404.html"; var serverAdmin = "[no contact information]"; @@ -1180,7 +1180,7 @@ var allowDoubleSlashes = false; var allowPostfixDoubleSlashes = false; // Get properties from config.json -if (configJSON.blacklist != undefined) rawBlackList = configJSON.blacklist; +if (configJSON.blacklist != undefined) rawBlockList = configJSON.blacklist; if (configJSON.wwwredirect != undefined) wwwredirect = configJSON.wwwredirect; if (configJSON.port != undefined) port = configJSON.port; if (configJSON.pubport != undefined) pubport = configJSON.pubport; @@ -1255,7 +1255,7 @@ try { configJSON.version = version; configJSON.productName = "SVR.JS"; -var blacklist = ipBlockList(rawBlackList); +var blocklist = ipBlockList(rawBlockList); var nonStandardCodes = []; nonStandardCodesRaw.forEach(function (nonStandardCodeRaw) { @@ -4099,13 +4099,13 @@ if (!cluster.isPrimary) { } try { - // scan blacklist - if (blacklist.check(reqip) && href != "/favicon.ico") { + // Scan the block list + if (blocklist.check(reqip) && href != "/favicon.ico") { // Return client blocked message var bheaders = getCustomHeaders(); bheaders["Content-Type"] = "text/html; charset=utf8"; res.writeHead(403, "Client blocked", bheaders); - res.write("
Request from " + reqip + " is denied. The client is now in the blacklist.
SVR.JS/" + version + " (" + getOS() + "; " + (process.isBun ? ("Bun/v" + process.versions.bun + "; like Node.JS/" + process.version) : ("Node.JS/" + process.version)) + ")" + (req.headers.host == undefined ? "" : " on " + String(req.headers.host).replace(/&/g, "&").replace(//g, ">")) + "
Request from " + reqip + " is denied. The client is now in the block list.
SVR.JS/" + version + " (" + getOS() + "; " + (process.isBun ? ("Bun/v" + process.versions.bun + "; like Node.JS/" + process.version) : ("Node.JS/" + process.version)) + ")" + (req.headers.host == undefined ? "" : " on " + String(req.headers.host).replace(/&/g, "&").replace(//g, ">")) + "