Merge pull request #1254 from jonnytest1/server-crash

fixed invalid unauathorized handler
This commit is contained in:
David Négrier 2021-07-05 14:42:20 +02:00 committed by GitHub
commit 194d6a6414
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ export class DebugController {
const query = parse(req.getQuery());
if (query.token !== ADMIN_API_TOKEN) {
return res.status(401).send("Invalid token sent!");
return res.writeStatus("401 Unauthorized").end("Invalid token sent!");
}
return res

View file

@ -16,7 +16,7 @@ export class DebugController {
const query = parse(req.getQuery());
if (query.token !== ADMIN_API_TOKEN) {
return res.status(401).send("Invalid token sent!");
return res.writeStatus("401 Unauthorized").end("Invalid token sent!");
}
return res