We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78009fd commit 3010bc8Copy full SHA for 3010bc8
lib/requestHandlers.js
@@ -4,7 +4,8 @@ const { configuration } = require("./config");
4
5
// Our gatekeeper: Any request must pass it's tests before being allowed to continue.
6
function handleAllRequests(req, res, next) {
7
- if (!["/list", "/add", "/remove"].includes(req.path)) res.status(401).send("Unauthorized");
+ if (!["/list", "/add", "/remove"].some((path) => req.path.includes(path)))
8
+ return res.status(401).send("Unauthorized");
9
10
if (!req.body.serverKey || req.body.serverKey !== configuration.Auth.communicationKey)
11
return res.status(403).send("Forbidden");
0 commit comments