forms login

This commit is contained in:
Jan Prochazka
2022-11-26 11:21:37 +01:00
parent 9a5287725b
commit b1ae7d53b9
6 changed files with 84 additions and 20 deletions

View File

@@ -42,7 +42,7 @@ function start() {
const server = http.createServer(app);
const logins = getLogins();
if (logins) {
if (logins && process.env.BASIC_AUTH) {
app.use(
basicAuth({
users: _.fromPairs(logins.map(x => [x.login, x.password])),