Skip to content

Commit

Permalink
Fix redis_sentinel password usage
Browse files Browse the repository at this point in the history
When using a password in Redis Sentinel, it should be provided at both levels
  • Loading branch information
sebmil-daily committed Sep 3, 2024
1 parent 8752139 commit 541c237
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions backends/redis-sentinel.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ type RedisSentinelBackend struct {
// NewRedisSentinelBackend initializes the Redis Sentinel client and pings to make sure connection was successful
func NewRedisSentinelBackend(cfg config.RedisSentinel, ctx context.Context) *RedisSentinelBackend {
options := &redis.FailoverOptions{
MasterName: cfg.MasterName,
SentinelAddrs: cfg.SentinelAddrs,
Password: cfg.Password,
DB: cfg.Db,
MasterName: cfg.MasterName,
SentinelAddrs: cfg.SentinelAddrs,
SentinelPassword: cfg.Password,
Password: cfg.Password,
DB: cfg.Db,
}

if cfg.TLS.Enabled {
Expand Down

0 comments on commit 541c237

Please sign in to comment.