Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Commit a05aa92

Browse files
authored
fix(vault): follow all redirects to support vault HA (#394)
1 parent 131e201 commit a05aa92

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

config/index.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,15 @@ const systemManagerBackend = new SystemManagerBackend({
5454
assumeRole: awsConfig.assumeRole,
5555
logger
5656
})
57-
const vaultClient = vault({ apiVersion: 'v1', endpoint: envConfig.vaultEndpoint })
57+
const vaultClient = vault({
58+
apiVersion: 'v1',
59+
endpoint: envConfig.vaultEndpoint,
60+
requestOptions: {
61+
// When running vault in HA mode, you must follow redirects on PUT/POST/DELETE
62+
// See: https://github.com/kr1sp1n/node-vault/issues/23
63+
followAllRedirects: true
64+
}
65+
})
5866
const vaultBackend = new VaultBackend({ client: vaultClient, logger })
5967
const azureKeyVaultBackend = new AzureKeyVaultBackend({
6068
credential: azureConfig.azureKeyVault(),

0 commit comments

Comments
 (0)