mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
Added flag and env var which will disable client redirection (#17352)
* Added flag and env var which will disable client redirection * Added changelog * Docs fix for unsaved file, and test single request made * Updated test for case when redirect is enabled, updated docs based on suggestions
This commit is contained in:
@@ -40,19 +40,20 @@ type BaseCommand struct {
|
||||
flags *FlagSets
|
||||
flagsOnce sync.Once
|
||||
|
||||
flagAddress string
|
||||
flagAgentAddress string
|
||||
flagCACert string
|
||||
flagCAPath string
|
||||
flagClientCert string
|
||||
flagClientKey string
|
||||
flagNamespace string
|
||||
flagNS string
|
||||
flagPolicyOverride bool
|
||||
flagTLSServerName string
|
||||
flagTLSSkipVerify bool
|
||||
flagWrapTTL time.Duration
|
||||
flagUnlockKey string
|
||||
flagAddress string
|
||||
flagAgentAddress string
|
||||
flagCACert string
|
||||
flagCAPath string
|
||||
flagClientCert string
|
||||
flagClientKey string
|
||||
flagNamespace string
|
||||
flagNS string
|
||||
flagPolicyOverride bool
|
||||
flagTLSServerName string
|
||||
flagTLSSkipVerify bool
|
||||
flagDisableRedirects bool
|
||||
flagWrapTTL time.Duration
|
||||
flagUnlockKey string
|
||||
|
||||
flagFormat string
|
||||
flagField string
|
||||
@@ -427,6 +428,15 @@ func (c *BaseCommand) flagSet(bit FlagSetBit) *FlagSets {
|
||||
"transmissions to and from the Vault server.",
|
||||
})
|
||||
|
||||
f.BoolVar(&BoolVar{
|
||||
Name: flagNameDisableRedirects,
|
||||
Target: &c.flagDisableRedirects,
|
||||
Default: false,
|
||||
EnvVar: api.EnvVaultDisableRedirects,
|
||||
Usage: "Disable the default client behavior, which honors a single " +
|
||||
"redirect response from a request",
|
||||
})
|
||||
|
||||
f.BoolVar(&BoolVar{
|
||||
Name: "policy-override",
|
||||
Target: &c.flagPolicyOverride,
|
||||
|
||||
Reference in New Issue
Block a user