1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-05 02:30:55 +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" "reflect"
"runtime" "runtime"
"strings" "strings"
"crypto/tls"
"github.com/astaxie/beego/config" "github.com/astaxie/beego/config"
"github.com/astaxie/beego/context" "github.com/astaxie/beego/context"
@ -65,6 +66,7 @@ type Listen struct {
HTTPSCertFile string HTTPSCertFile string
HTTPSKeyFile string HTTPSKeyFile string
TrustCaFile string TrustCaFile string
ClientAuth tls.ClientAuthType
EnableAdmin bool EnableAdmin bool
AdminAddr string AdminAddr string
AdminPort int AdminPort int
@ -234,6 +236,7 @@ func newBConfig() *Config {
AdminPort: 8088, AdminPort: 8088,
EnableFcgi: false, EnableFcgi: false,
EnableStdIo: false, EnableStdIo: false,
ClientAuth: tls.VerifyClientCertIfGiven,
}, },
WebConfig: WebConfig{ WebConfig: WebConfig{
AutoRender: true, AutoRender: true,