fix redis auth for hosts containing redis
This commit is contained in:
parent
7c5b4ca927
commit
9bc592818a
|
@ -18,12 +18,12 @@ exports.Databases = {
|
||||||
exports.SEPARATOR = SEPARATOR
|
exports.SEPARATOR = SEPARATOR
|
||||||
|
|
||||||
exports.getRedisOptions = (clustered = false) => {
|
exports.getRedisOptions = (clustered = false) => {
|
||||||
const [host, port] = REDIS_URL.split(":")
|
const [host, port, ...rest] = REDIS_URL.split(":")
|
||||||
|
|
||||||
let redisProtocolUrl
|
let redisProtocolUrl
|
||||||
|
|
||||||
// fully qualified redis URL
|
// fully qualified redis URL
|
||||||
if (/rediss?/.test(host)) {
|
if (rest.length && /rediss?/.test(host)) {
|
||||||
redisProtocolUrl = REDIS_URL
|
redisProtocolUrl = REDIS_URL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue