mirror of
https://github.com/yudai/gotty.git
synced 2025-12-25 03:40:13 +01: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
1 changed files with 6 additions and 2 deletions
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…
Add table
Add a link
Reference in a new issue