Skip to content

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

get port from url

adilson3805af759417
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 0991eea805..fe3d33357e 100644
--- a/backend/src/services/external-migration/external-migration-fns/vault.ts
+++ b/backend/src/services/external-migration/external-migration-fns/vault.ts
@@ -296,11 +296,11 @@ const vaultFactory = (
if (gatewayId) {
const url = new URL(baseUrl);
- const { protocol, hostname } = url;
+ const { port, protocol, hostname } = url;
const cleanedProtocol = protocol.slice(0, -1);
const defaultPort = cleanedProtocol === "https" ? 443 : 80;
- const targetPort = defaultPort;
+ const targetPort = port ? Number(port) : defaultPort;
data = await $gatewayProxyWrapper(
{