1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-25 17:30:50 +00:00

对 Listen 结构体增加 ClientAuth 字段

对 Listen 结构体增加 ClientAuth 字段,赋予默认配置对象该字段值为 tls.VerifyClientCertIfGiven,与原代码逻辑的默认值保持一致
This commit is contained in:
Mr. Myy 2020-07-30 10:59:32 +08:00 committed by GitHub
parent 15e11931fc
commit 513a4afff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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