From 0efbdcd4e51eab1efeff8c8db5453ac4b3c23ad5 Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Tue, 5 Jan 2021 18:29:49 +0300 Subject: [PATCH] feat: handle TLS Redis via verify_none --- CHANGELOG.md | 2 ++ pubsub/redis.go | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f740aa6..7dbaee4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master +- Handle TLS Redis connections by using VERIFY_NONE mode. ([@palkan][]) + - Added `rpc_pending_num` metric. ([@palkan][]) ## 1.0.2 (2020-09-08) diff --git a/pubsub/redis.go b/pubsub/redis.go index 5bdd2213..d51676dd 100644 --- a/pubsub/redis.go +++ b/pubsub/redis.go @@ -95,6 +95,7 @@ func (s *RedisSubscriber) Start() error { redis.DialConnectTimeout(timeout), redis.DialReadTimeout(timeout), redis.DialReadTimeout(timeout), + redis.DialTLSSkipVerify(true), } sentinelURI, err := url.Parse(fmt.Sprintf("redis://%s", addr)) @@ -186,8 +187,10 @@ func (s *RedisSubscriber) Shutdown() { } func (s *RedisSubscriber) listen() error { - - c, err := redis.DialURL(s.url) + dialOptions := []redis.DialOption{ + redis.DialTLSSkipVerify(true), + } + c, err := redis.DialURL(s.url, dialOptions...) if err != nil { return err