Use 302 http status for blacklisted redirects

Co-authored-by: Wildan M <willnode@wellosoft.net>
This commit is contained in:
Daniel Zegarra 2023-04-23 18:24:29 +02:00 committed by GitHub
commit 2cadd68506
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,7 +75,7 @@ const listener = async function (req, res) {
resolveCache[host] = cache;
}
if (cache.blacklisted) {
res.writeHead(cache.httpStatus, {
res.writeHead(302, {
'Location': (process.env.BLACKLIST_REDIRECT || 'https://forwarddomain.net/blacklisted') + "?d=" + req.headers.host,
});
return;