Skip to content

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

define ports for vault gateway

adilson489ee9e2a132
diff --git a/backend/src/services/external-migration/external-migration-fns/vault.ts b/backend/src/services/external-migration/external-migration-fns/vault.ts
index 8798e049db..373a71488b 100644
--- a/backend/src/services/external-migration/external-migration-fns/vault.ts
+++ b/backend/src/services/external-migration/external-migration-fns/vault.ts
@@ -296,15 +296,18 @@ const vaultFactory = (
if (gatewayId) {
const url = new URL(baseUrl);
- const { port, protocol, hostname } = url;
+ const { protocol, hostname } = url;
const cleanedProtocol = protocol.slice(0, -1);
+ const defaultPort = cleanedProtocol === "https:" ? 443 : 80;
+ const targetPort = defaultPort;
+
data = await $gatewayProxyWrapper(
{
gatewayId,
targetProtocol: cleanedProtocol,
targetHostname: hostname,
- targetPort: port ? Number(port) : 8200 // 8200, default port for Vault self-hosted/dedicated
+ targetPort
},
getData
);