mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
Use TLS in production
This commit is contained in:
@@ -7,7 +7,7 @@ export abstract class BaseRedisRepository {
|
|||||||
redisClient = createClient({
|
redisClient = createClient({
|
||||||
url: process.env.REDIS_URL,
|
url: process.env.REDIS_URL,
|
||||||
socket: {
|
socket: {
|
||||||
tls: (process.env.REDIS_URL?.match(/rediss:/) != null),
|
tls: process.env.NODE_ENV === 'production',
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: false,
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@@ -30,4 +30,4 @@ export abstract class BaseRedisRepository {
|
|||||||
public async clearAllData() {
|
public async clearAllData() {
|
||||||
await this.redisClient.flushAll();
|
await this.redisClient.flushAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user