取消servername校验

This commit is contained in:
wangjie 2025-07-26 00:58:51 +08:00
parent eea1bbc18c
commit bc6f4ae6c4

View File

@ -100,8 +100,8 @@ func InitDB(env string, conf DbConfig) {
tlsConfig := &tls.Config{
RootCAs: caCertPool, // 信任的CA
//Certificates: []tls.Certificate{cert}, // 客户端证书
ServerName: conf.Host,
MinVersion: tls.VersionTLS12, // 最小TLS版本
//ServerName: conf.Host,
//MinVersion: tls.VersionTLS12, // 最小TLS版本
}
// 5. 注册自定义TLS配置到MySQL驱动