添加常见问题

This commit is contained in:
bjdgyc
2021-04-12 18:33:05 +08:00
parent cf8487f8f4
commit 59acda4706
3 changed files with 11 additions and 8 deletions

View File

@@ -13,11 +13,6 @@ import (
"github.com/gorilla/mux"
)
func GetCertificate(*tls.ClientHelloInfo) (*tls.Certificate, error) {
cert, err := tls.LoadX509KeyPair(base.Cfg.CertFile, base.Cfg.CertKey)
return &cert, err
}
func startTls() {
addr := base.Cfg.ServerAddr
certFile := base.Cfg.CertFile
@@ -28,7 +23,6 @@ func startTls() {
NextProtos: []string{"http/1.1"},
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
GetCertificate: GetCertificate,
}
srv := &http.Server{
Addr: addr,