mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 10:16:03 +00:00
Only add users to basicAuth when password is truthy
This commit is contained in:
@@ -48,7 +48,7 @@ function start() {
|
|||||||
if (logins && process.env.BASIC_AUTH) {
|
if (logins && process.env.BASIC_AUTH) {
|
||||||
app.use(
|
app.use(
|
||||||
basicAuth({
|
basicAuth({
|
||||||
users: _.fromPairs(logins.map(x => [x.login, x.password])),
|
users: _.fromPairs(logins.filter(x => x.password).map(x => [x.login, x.password])),
|
||||||
challenge: true,
|
challenge: true,
|
||||||
realm: 'DbGate Web App',
|
realm: 'DbGate Web App',
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user