From 26563ceb176c676a2c2935a577a98b5a0a5de337 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Feb 2024 13:47:19 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=AE=8C=E5=96=84=E7=BD=91=E5=85=B3?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=20aws=20redis=20=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/srvconn/conn_redis.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/srvconn/conn_redis.go b/pkg/srvconn/conn_redis.go index 3bd37c3fb..227cdb6d8 100644 --- a/pkg/srvconn/conn_redis.go +++ b/pkg/srvconn/conn_redis.go @@ -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))