Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Fix

x0322052d8068159725
diff --git a/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts b/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
index 4c671986f2..cee6cbbfc9 100644
--- a/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
+++ b/backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
@@ -76,13 +76,16 @@ const getConnectionConfig = ({
}
};
-export const getSqlConnectionClient = async (appConnection: Pick<TSqlConnection, "credentials" | "app">) => {
+export const getSqlConnectionClient = async (
+ appConnection: Pick<TSqlConnection, "credentials" | "app" | "gatewayId">
+) => {
const {
app,
- credentials: { host: baseHost, database, port, password, username }
+ credentials: { host: baseHost, database, port, password, username },
+ gatewayId
} = appConnection;
- const [host] = await verifyHostInputValidity(baseHost);
+ const [host] = await verifyHostInputValidity(baseHost, !!gatewayId);
const client = knex({
client: SQL_CONNECTION_CLIENT_MAP[app],