1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-20 02:11:30 +00:00

Backend of local login working

This commit is contained in:
Scott Tolksdorf
2017-01-06 19:43:16 -05:00
parent a26c4e2092
commit d77fa0a3dc
6 changed files with 30 additions and 13 deletions

View File

@@ -37,6 +37,7 @@ const Middleware = {
if(!creds
|| creds.name !== config.get('admin:user')
|| creds.pass !== config.get('admin:pass')){
res.setHeader('WWW-Authenticate', 'Basic realm="example"');
return next(Error.noAdmin());
}
return next();