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 +}