Changes redirection for blacklisted domains

This commit is contained in:
Pierre Lannoy 2023-12-21 09:35:54 +01:00
commit 4c9d9a5413
Signed by: Pierre Lannoy
GPG key ID: D27231EF87D53F31
2 changed files with 2 additions and 2 deletions

View file

@ -1,4 +1,4 @@
HTTP_PORT=80 HTTP_PORT=80
HTTPS_PORT=443 HTTPS_PORT=443
BLACKLIST_HOSTS="bad.example,evil.example" BLACKLIST_HOSTS="bad.example,evil.example"
BLACKLIST_REDIRECT="https://forwarddomain.net/blacklisted" BLACKLIST_REDIRECT="https://www.youtube.com/watch?v=dQw4w9WgXcQ"

View file

@ -78,7 +78,7 @@ const listener = async function (req, res) {
} }
if (cache.blacklisted) { if (cache.blacklisted) {
res.writeHead(302, { res.writeHead(302, {
'Location': (process.env.BLACKLIST_REDIRECT || 'https://forwarddomain.net/blacklisted') + "?d=" + req.headers.host, 'Location': (process.env.BLACKLIST_REDIRECT || 'https://www.youtube.com/watch?v=dQw4w9WgXcQ') /*+ "?d=" + req.headers.host*/,
}); });
return; return;
} }