Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

Commit

Permalink
feat: handle TLS Redis via verify_none
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Jan 5, 2021
1 parent 4dab367 commit 0efbdcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 5 additions & 2 deletions pubsub/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0efbdcd

Please sign in to comment.