mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Only pass through keys to redis that are explicitly set in the config
This commit is contained in:
parent
40b7da8edb
commit
39d920682a
1 changed files with 5 additions and 2 deletions
|
@ -113,8 +113,11 @@ module.exports =
|
|||
rclient = new Redis.Cluster(config.cluster)
|
||||
driver = "ioredis"
|
||||
else
|
||||
{host, port, password, endpoints, masterName} = config
|
||||
rclient = require("redis-sharelatex").createClient({host, port, password, endpoints, masterName})
|
||||
redis_config = {}
|
||||
for key in ["host", "port", "password", "endpoints", "masterName"]
|
||||
if config[key]?
|
||||
redis_config[key] = config[key]
|
||||
rclient = require("redis-sharelatex").createClient(redis_config)
|
||||
driver = "redis"
|
||||
return {
|
||||
rclient: rclient
|
||||
|
|
Loading…
Reference in a new issue