1
0
Fork 0
mirror of synced 2024-07-01 12:30:41 +12:00

fix redis auth for hosts containing redis

This commit is contained in:
Martin McKeaveney 2021-09-10 10:08:13 +01:00
parent 7c5b4ca927
commit 9bc592818a

View file

@ -18,12 +18,12 @@ exports.Databases = {
exports.SEPARATOR = SEPARATOR
exports.getRedisOptions = (clustered = false) => {
const [host, port] = REDIS_URL.split(":")
const [host, port, ...rest] = REDIS_URL.split(":")
let redisProtocolUrl
// fully qualified redis URL
if (/rediss?/.test(host)) {
if (rest.length && /rediss?/.test(host)) {
redisProtocolUrl = REDIS_URL
}