From 86710657dfee37281bae4791245c0557173f0bdb Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Thu, 3 Jul 2025 16:30:12 -0400 Subject: [PATCH] Use TLS in production --- src/repositories/BaseRedisRepository.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/repositories/BaseRedisRepository.ts b/src/repositories/BaseRedisRepository.ts index 4793d0a..e66acc1 100644 --- a/src/repositories/BaseRedisRepository.ts +++ b/src/repositories/BaseRedisRepository.ts @@ -7,7 +7,7 @@ export abstract class BaseRedisRepository { redisClient = createClient({ url: process.env.REDIS_URL, socket: { - tls: (process.env.REDIS_URL?.match(/rediss:/) != null), + tls: process.env.NODE_ENV === 'production', rejectUnauthorized: false, } }), @@ -30,4 +30,4 @@ export abstract class BaseRedisRepository { public async clearAllData() { await this.redisClient.flushAll(); } -} \ No newline at end of file +}