mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-22 12:24:25 +00:00
Merge pull request #14 from devanlai/fix-auth-enable-from-config
Fix auth modes enabled by config file
This commit is contained in:
commit
97c080dc59
8
main.go
8
main.go
@ -65,8 +65,12 @@ func main() {
|
|||||||
|
|
||||||
utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions)
|
utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions)
|
||||||
|
|
||||||
appOptions.EnableBasicAuth = c.IsSet("credential")
|
if c.IsSet("credential") {
|
||||||
appOptions.EnableTLSClientAuth = c.IsSet("tls-ca-crt")
|
appOptions.EnableBasicAuth = true
|
||||||
|
}
|
||||||
|
if c.IsSet("tls-ca-crt") {
|
||||||
|
appOptions.EnableTLSClientAuth = true
|
||||||
|
}
|
||||||
|
|
||||||
err = appOptions.Validate()
|
err = appOptions.Validate()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user