Allow custom headers on CLI

This commit is contained in:
carlosmonastyrski
2025-03-27 14:33:05 -03:00
parent d55ddcd577
commit 5b11232325
14 changed files with 186 additions and 50 deletions

View File

@@ -319,6 +319,7 @@ func issueCredentials(cmd *cobra.Command, args []string) {
SiteUrl: config.INFISICAL_URL,
UserAgent: api.USER_AGENT,
AutoTokenRefresh: false,
CustomHeaders: os.Getenv("INFISICAL_CUSTOM_HEADERS"),
})
infisicalClient.Auth().SetAccessToken(infisicalToken)
@@ -559,6 +560,7 @@ func signKey(cmd *cobra.Command, args []string) {
SiteUrl: config.INFISICAL_URL,
UserAgent: api.USER_AGENT,
AutoTokenRefresh: false,
CustomHeaders: os.Getenv("INFISICAL_CUSTOM_HEADERS"),
})
infisicalClient.Auth().SetAccessToken(infisicalToken)