Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 89cfb15

Browse files
Fix for wrong MongDB URL (#923)
Fix of wrong URL concat
1 parent 4246b06 commit 89cfb15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/management_api/initdb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ function prepareDB(next) {
4141
cipher.unlock(cipher.k, cipher.astore, function cb (err, authConfig) {
4242
if (!err) {
4343
if (authConfig.mongo && !dbURL.includes('@')) {
44-
dbURL = authConfig.mongo.username
44+
dbURL = "mongodb://" + authConfig.mongo.username
4545
+ ':' + authConfig.mongo.password
46-
+ '@' + dbURL;
46+
+ '@' + dbURL.replace("mongodb://", "");
4747
}
4848
} else {
4949
console.error('Failed to get mongodb auth:', err);

0 commit comments

Comments
 (0)