Skip to content

Commit

Permalink
对 Listen 结构体增加 ClientAuth 字段
Browse files Browse the repository at this point in the history
对 Listen 结构体增加 ClientAuth 字段,赋予默认配置对象该字段值为 tls.VerifyClientCertIfGiven,与原代码逻辑的默认值保持一致
  • Loading branch information
livelyRyan authored Jul 30, 2020
1 parent 15e1193 commit 513a4af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"reflect"
"runtime"
"strings"
"crypto/tls"

"github.com/astaxie/beego/config"
"github.com/astaxie/beego/context"
Expand Down Expand Up @@ -65,6 +66,7 @@ type Listen struct {
HTTPSCertFile string
HTTPSKeyFile string
TrustCaFile string
ClientAuth tls.ClientAuthType
EnableAdmin bool
AdminAddr string
AdminPort int
Expand Down Expand Up @@ -234,6 +236,7 @@ func newBConfig() *Config {
AdminPort: 8088,
EnableFcgi: false,
EnableStdIo: false,
ClientAuth: tls.VerifyClientCertIfGiven,
},
WebConfig: WebConfig{
AutoRender: true,
Expand Down

0 comments on commit 513a4af

Please sign in to comment.