diff --git a/index.html b/index.html
index 4de3f20..55cc133 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,6 @@
-
@@ -65,6 +64,17 @@
+
+ ℹ️ Details on blocked / allowed domains
+ To prevent abuse, the domains this proxy can be used with is limited by the following:
+
+ Blocklist: [[BLOCKLIST]]
+
+
+ Allowlist: [[ALLOWLIST]]
+
+
+
diff --git a/index.js b/index.js
index 42ea2cf..993bc12 100644
--- a/index.js
+++ b/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);