root: support redis username (#8935)

This commit is contained in:
Jens L
2024-03-18 12:44:38 +01:00
committed by GitHub
parent 82ac7d195d
commit 104e70c383
3 changed files with 7 additions and 4 deletions

View File

@ -32,8 +32,8 @@ func (a *Application) getStore(p api.ProxyOutpostConfig, externalHost *url.URL)
}
if a.isEmbedded {
client := redis.NewClient(&redis.Options{
Addr: fmt.Sprintf("%s:%d", config.Get().Redis.Host, config.Get().Redis.Port),
// Username: config.Get().Redis.Password,
Addr: fmt.Sprintf("%s:%d", config.Get().Redis.Host, config.Get().Redis.Port),
Username: config.Get().Redis.Username,
Password: config.Get().Redis.Password,
DB: config.Get().Redis.DB,
})