Skip to content

Commit 2d543f3

Browse files
committed
[core] Fix WAHA Dashboard /jobs creds
1 parent 47088cf commit 2d543f3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/apps/app_sdk/auth.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ export function BullAuthMiddleware() {
88
let password = process.env.WAHA_DASHBOARD_PASSWORD;
99
if (process.env.WAHA_DASHBOARD_ENABLED) {
1010
const enabled = parseBool(process.env.WAHA_DASHBOARD_ENABLED);
11-
// Generate a random uuid4 username /password to prevent access
12-
username = 'admin';
13-
password = crypto.randomUUID();
11+
if (!enabled) {
12+
// Generate a random uuid4 username /password to prevent access
13+
username = 'admin';
14+
password = crypto.randomUUID();
15+
}
1416
}
1517

1618
return basicAuth({

0 commit comments

Comments
 (0)