Fix support for IPv6 redis connections in streaming (#31229)

pull/31167/head
Emelia Smith 2024-08-02 08:56:09 +02:00 committed by GitHub
parent f55099fea3
commit 7490019535
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -248,6 +248,10 @@ const redisConfigFromEnv = (env) => {
const redisParams = {
host: env.REDIS_HOST || '127.0.0.1',
port: redisPort,
// Force support for both IPv6 and IPv4, by default ioredis sets this to 4,
// only allowing IPv4 connections:
// https://github.com/redis/ioredis/issues/1576
family: 0,
db: redisDatabase,
password: env.REDIS_PASSWORD || undefined,
};