mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
Only add users to basicAuth when password is truthy
This commit is contained in:
parent
58233a2fd5
commit
26471517a9
@ -48,7 +48,7 @@ function start() {
|
||||
if (logins && process.env.BASIC_AUTH) {
|
||||
app.use(
|
||||
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,
|
||||
realm: 'DbGate Web App',
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user