mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-24 02:58:05 +01:00
:3
This commit is contained in:
parent
904d6e79b2
commit
d06ac6a18e
1 changed files with 1 additions and 0 deletions
|
@ -73,6 +73,7 @@ const proxy = async (req, res) => {
|
|||
return res.status(400).send("Malformed URL");
|
||||
}
|
||||
|
||||
// Sanity check, to avoid being used as an open proxy
|
||||
if (!URL_WHITELIST.includes(url.host)) {
|
||||
console.log(`==> Refusing to proxy host ${url.host}`);
|
||||
res.status(401).send(`Hostname '${url.host}' is not permitted`);
|
||||
|
|
Loading…
Reference in a new issue