summary refs log tree commit diff
path: root/src/routes/external.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/routes/external.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/routes/external.ts b/src/routes/external.ts

index 2f8de5d9..dcf56c8c 100644 --- a/src/routes/external.ts +++ b/src/routes/external.ts
@@ -30,6 +30,8 @@ const DEFAULT_FETCH_OPTIONS: any = { }; router.post("/", bodyParser.json(), async (req, res) => { + if (req.headers.signature !== Config.get().security.requestSignature) + throw new HTTPError("Invalid request signature"); if (!req.body) throw new HTTPError("Invalid Body"); const { url } = req.body; if (!url || typeof url !== "string") throw new HTTPError("Invalid url");