mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-21 20:14:24 +00:00
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:
parent
4b85419943
commit
fa09e03b99
8
main.go
8
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user