mirror of
https://github.com/astaxie/beego.git
synced 2024-11-24 23:50:55 +00:00
移除多余的条件判断
This commit is contained in:
parent
5203804165
commit
7831638f37
8
app.go
8
app.go
@ -195,14 +195,10 @@ func (app *App) Run(mws ...MiddleWare) {
|
||||
return
|
||||
}
|
||||
pool.AppendCertsFromPEM(data)
|
||||
tlsConfig := tls.Config{
|
||||
app.Server.TLSConfig = &tls.Config{
|
||||
ClientCAs: pool,
|
||||
ClientAuth: tls.RequireAndVerifyClientCert,
|
||||
ClientAuth: BConfig.Listen.ClientAuth,
|
||||
}
|
||||
if string(BConfig.Listen.ClientAuth) != "" {
|
||||
tlsConfig.ClientAuth = BConfig.Listen.ClientAuth
|
||||
}
|
||||
app.Server.TLSConfig = &tlsConfig
|
||||
}
|
||||
if err := app.Server.ListenAndServeTLS(BConfig.Listen.HTTPSCertFile, BConfig.Listen.HTTPSKeyFile); err != nil {
|
||||
logs.Critical("ListenAndServeTLS: ", err)
|
||||
|
Loading…
Reference in New Issue
Block a user