Added domain limit details to webpage
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
8
index.js
8
index.js
@@ -79,11 +79,15 @@ http.createServer((req, response) => {
|
||||
}).listen(PORT);
|
||||
|
||||
function loadWebpage(req, res) {
|
||||
fs.readFile(__dirname + "/index.html")
|
||||
fs.readFile(__dirname + "/index.html", { encoding: 'utf8' })
|
||||
.then(contents => {
|
||||
res.setHeader("Content-Type", "text/html");
|
||||
res.writeHead(200);
|
||||
res.end(contents);
|
||||
res.end(
|
||||
contents
|
||||
.replaceAll('[[BLOCKLIST]]', JSON.stringify(blockList))
|
||||
.replaceAll('[[ALLOWLIST]]', JSON.stringify(allowList))
|
||||
);
|
||||
})
|
||||
.catch(err => {
|
||||
res.writeHead(500);
|
||||
|
Reference in New Issue
Block a user