🛂 Disable auth if no password is set

This commit is contained in:
2022-05-19 23:46:33 +02:00
parent fde5a07ddf
commit f5795637cf

View File

@ -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;