chore: Support Redis v6 on Heroku
This commit is contained in:
parent
92016bbd06
commit
0a998789a3
|
@ -7,6 +7,13 @@ const options = {
|
|||
console.warn(`Retrying redis connection: attempt ${times}`);
|
||||
return Math.min(times * 100, 3000);
|
||||
},
|
||||
// support Heroku Redis, see:
|
||||
// https://devcenter.heroku.com/articles/heroku-redis#ioredis-module
|
||||
tls: process.env.REDIS_URL.startsWith("rediss://")
|
||||
? {
|
||||
rejectUnauthorized: false,
|
||||
}
|
||||
: undefined,
|
||||
};
|
||||
|
||||
const client = new Redis(process.env.REDIS_URL, options);
|
||||
|
|
Reference in New Issue