mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-09 15:15:58 +08:00
fixed tiny bug with token finding
This commit is contained in:
parent
32a2a73915
commit
2c01c5f817
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue