From fa09e03b9943f04885f1e297d410f2be568f6c8d Mon Sep 17 00:00:00 2001 From: Devan Lai Date: Sun, 30 May 2021 02:11:07 -0700 Subject: [PATCH] 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 --- main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index ae45b1e..41c8839 100644 --- a/main.go +++ b/main.go @@ -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 {