镜像自地址
https://github.com/astaxie/beego.git
已同步 2025-07-17 18:52:16 +00:00
2
app.go
2
app.go
@@ -197,7 +197,7 @@ func (app *App) Run(mws ...MiddleWare) {
|
||||
pool.AppendCertsFromPEM(data)
|
||||
app.Server.TLSConfig = &tls.Config{
|
||||
ClientCAs: pool,
|
||||
ClientAuth: tls.RequireAndVerifyClientCert,
|
||||
ClientAuth: BConfig.Listen.ClientAuth,
|
||||
}
|
||||
}
|
||||
if err := app.Server.ListenAndServeTLS(BConfig.Listen.HTTPSCertFile, BConfig.Listen.HTTPSKeyFile); err != nil {
|
||||
|
@@ -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.RequireAndVerifyClientCert,
|
||||
},
|
||||
WebConfig: WebConfig{
|
||||
AutoRender: true,
|
||||
|
在新工单中引用
屏蔽一个用户