fixed tiny bug with token finding

This commit is contained in:
Miodec 2021-06-16 20:56:00 +01:00
parent 32a2a73915
commit 2c01c5f817

View file

@ -10,7 +10,7 @@ module.exports = {
new MonkeyError(404, "Unauthorized", "No authorization header")
);
const token = authorization.split(" ");
if (token[0] !== "Bearer ")
if (token[0].trim() !== "Bearer")
return next(
new MonkeyError(
400,