Add REDIS_USE_TLS environment variable to configure TLS for Redis

This commit is contained in:
2026-02-23 12:06:10 -08:00
parent ecc9cdd747
commit b1420cfa7e
4 changed files with 6 additions and 3 deletions

View File

@@ -5,10 +5,11 @@ export default function createRedisClientForRepository() {
const client = createClient({
url: process.env.REDIS_URL,
socket: {
tls: process.env.NODE_ENV === 'production',
tls: process.env.REDIS_USE_TLS === "1",
rejectUnauthorized: false,
reconnectStrategy: REDIS_RECONNECT_INTERVAL,
},
} as object,
});
return client as RedisClientType;
}