Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: use mongodb:// instead of mongodb (#4359)

h3n4l91d8f1b8f89e
diff --git a/frontend/src/components/CreateInstanceForm.vue b/frontend/src/components/CreateInstanceForm.vue
index 861634ec1e..b612b31492 100644
--- a/frontend/src/components/CreateInstanceForm.vue
+++ b/frontend/src/components/CreateInstanceForm.vue
@@ -444,7 +444,7 @@ const state = reactive<LocalState>({
isCreatingInstance: false,
});
-const mongodbConnectionStringSchemaList = ["mongodb", "mongodb+srv"];
+const mongodbConnectionStringSchemaList = ["mongodb://", "mongodb+srv://"];
const isCreatingEmbeddedInstance = ref(false);
// For creating database onboarding guide, we only try to start our embedded sample postgres instance once.
@@ -589,10 +589,10 @@ const handleInstanceAuthenticationDatabaseInput = (event: Event) => {
const handleMongodbConnectionStringSchemaChange = (event: Event) => {
switch ((event.target as HTMLInputElement).value) {
- case "mongodb://":
+ case mongodbConnectionStringSchemaList[0]:
state.instance.srv = false;
break;
- case "mongodb+srv://":
+ case mongodbConnectionStringSchemaList[1]:
state.instance.srv = true;
break;
default:
diff --git a/frontend/src/components/InstanceForm.vue b/frontend/src/components/InstanceForm.vue
index e8376cb7c0..077def9f5c 100644
--- a/frontend/src/components/InstanceForm.vue
+++ b/frontend/src/components/InstanceForm.vue
@@ -547,7 +547,7 @@ const state = reactive<State>({
showFeatureModal: false,
});
-const mongodbConnectionStringSchemaList = ["mongodb", "mongodb+srv"];
+const mongodbConnectionStringSchemaList = ["mongodb://", "mongodb+srv://"];
const currentMongoDBConnectionSchema = computed(() => {
return currentDataSource.value.options.srv === false