Fix auth modes enabled by config file

Enable auth modes based on CLI options, but do not force auth modes
selected by the config file if not enabled by the CLI options
This commit is contained in:
Devan Lai 2021-05-30 02:11:07 -07:00
parent 4b85419943
commit fa09e03b99

View File

@ -65,8 +65,12 @@ func main() {
utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions)
appOptions.EnableBasicAuth = c.IsSet("credential")
appOptions.EnableTLSClientAuth = c.IsSet("tls-ca-crt")
if c.IsSet("credential") {
appOptions.EnableBasicAuth = true
}
if c.IsSet("tls-ca-crt") {
appOptions.EnableTLSClientAuth = true
}
err = appOptions.Validate()
if err != nil {