🛂 Disable auth if no password is set
This commit is contained in:
@ -21,6 +21,10 @@ export class Auth {
|
||||
}
|
||||
};
|
||||
checkLogin = (req, res, next) => {
|
||||
if (!process.env.AUTH_PASSWORD) {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
if (!req.cookies.session) {
|
||||
res.sendStatus(401);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user