mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-03 01:52:42 +00:00
change initial status code
This commit is contained in:
@@ -23,7 +23,7 @@ const mw = {
|
|||||||
if (!req.get('authorization')) {
|
if (!req.get('authorization')) {
|
||||||
return res
|
return res
|
||||||
.set('WWW-Authenticate', 'Basic realm="Authorization Required"')
|
.set('WWW-Authenticate', 'Basic realm="Authorization Required"')
|
||||||
.status(51)
|
.status(401)
|
||||||
.send('Authorization Required');
|
.send('Authorization Required');
|
||||||
}
|
}
|
||||||
const [username, password] = Buffer.from(req.get('authorization').split(' ').pop(), 'base64')
|
const [username, password] = Buffer.from(req.get('authorization').split(' ').pop(), 'base64')
|
||||||
|
|||||||
Reference in New Issue
Block a user