mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 03:48:35 +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");
|
return res.status(400).send("Malformed URL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sanity check, to avoid being used as an open proxy
|
||||||
if (!URL_WHITELIST.includes(url.host)) {
|
if (!URL_WHITELIST.includes(url.host)) {
|
||||||
console.log(`==> Refusing to proxy host ${url.host}`);
|
console.log(`==> Refusing to proxy host ${url.host}`);
|
||||||
res.status(401).send(`Hostname '${url.host}' is not permitted`);
|
res.status(401).send(`Hostname '${url.host}' is not permitted`);
|
||||||
|
|
Loading…
Reference in a new issue