Add comments

This commit is contained in:
Hongbo Wu 2022-09-22 11:24:54 +08:00
parent 279dbf2049
commit a7563a55e1

View file

@ -4,8 +4,8 @@ export const createRedisClient = async (url?: string, cert?: string) => {
const redisClient = createClient({
url,
socket: {
tls: url?.startsWith('rediss://'),
cert: cert?.replace(/\\n/g, '\n'),
tls: url?.startsWith('rediss://'), // rediss:// is the protocol for TLS
cert: cert?.replace(/\\n/g, '\n'), // replace \n with new line
rejectUnauthorized: false,
},
})