From f5795637cf291d149f18eeb06a18795f52006170 Mon Sep 17 00:00:00 2001 From: minie4 Date: Thu, 19 May 2022 23:46:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=82=20Disable=20auth=20if=20no=20passw?= =?UTF-8?q?ord=20is=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/auth.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/api/auth.js b/server/api/auth.js index 71c0bd4..4a36385 100644 --- a/server/api/auth.js +++ b/server/api/auth.js @@ -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;