Skip to content

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

apply recommendation

adilson3d9493d0a6b3
diff --git a/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts b/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
index d2d9cfd14e..a0b39f4cec 100644
--- a/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
+++ b/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
@@ -569,10 +569,10 @@ export const listHCVaultNamespaces = async (
}
// vault 1.0.0 does not support namespace root or /, so we need to handle this case
- // if the error is 301 and the namespace path is /, try to fetch the namespaces at the root
+ // if the error is 301 and the namespace path is /, try to fetch the namespaces without the namespace header
if (
((error instanceof AxiosError && error.response?.status === 301) || isGateway301Error(error)) &&
- namespacePath === "/"
+ (namespacePath === "/" || namespacePath === "root")
) {
return fetchHCVaultNamespacesWithoutNamespaceHeader({
connection,