Skip to content

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

fix: add support for http on gateway v1 as well

adilson5868f746b65c
diff --git a/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-fns.ts b/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-fns.ts
index 621cd57e03..bc3d551b68 100644
--- a/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-fns.ts
+++ b/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-fns.ts
@@ -132,21 +132,22 @@ export const requestWithAzureKeyVaultGateway = async <T>(
return withGatewayProxy(
async (proxyPort) => {
- const httpsAgent = new https.Agent({
- servername: targetHost
- });
+ const isHttps = url.protocol === "https:";
- url.protocol = "https:";
url.host = `localhost:${proxyPort}`;
const finalRequestConfig: AxiosRequestConfig = {
...requestConfig,
url: url.toString(),
- httpsAgent,
headers: {
...requestConfig.headers,
Host: targetHost
- }
+ },
+ ...(isHttps && {
+ httpsAgent: new https.Agent({
+ servername: targetHost
+ })
+ })
};
try {