Skip to content

Commit

Permalink
perf: 完善网关连接 aws redis 的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Feb 21, 2024
1 parent 722650c commit 26563ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/srvconn/conn_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ func checkRedisAccount(args *sqlOption) error {

if args.UseSSL {
tlsConfig := tls.Config{}
// 连接使用的是内部地址或者localhost时,跳过证书验证
if args.Host == "127.0.0.1" || args.Host == "localhost" {
tlsConfig.InsecureSkipVerify = true
}
if args.CaCert != "" {
rootCAs := x509.NewCertPool()
rootCAs.AppendCertsFromPEM([]byte(args.CaCert))
Expand Down

0 comments on commit 26563ce

Please sign in to comment.