fix: replace \n with new line in redis cert

This commit is contained in:
Hongbo Wu
2024-01-22 11:09:15 +08:00
parent 240a981d16
commit 628cfc64d1
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ export const createRedisClient = (url?: string, cert?: string) => {
connectTimeout: 10000, // 10 seconds
tls: cert
? {
cert,
cert: cert.replace(/\\n/g, '\n'), // replace \n with new line
rejectUnauthorized: false, // for self-signed certs
}
: undefined,

View File

@ -5,7 +5,7 @@ export const createRedisClient = (url?: string, cert?: string) => {
connectTimeout: 10000, // 10 seconds
tls: cert
? {
cert,
cert: cert.replace(/\\n/g, '\n'), // replace \n with new line
rejectUnauthorized: false, // for self-signed certs
}
: undefined,

View File

@ -5,7 +5,7 @@ export const createRedisClient = (url?: string, cert?: string) => {
connectTimeout: 10000, // 10 seconds
tls: cert
? {
cert,
cert: cert.replace(/\\n/g, '\n'), // replace \n with new line
rejectUnauthorized: false, // for self-signed certs
}
: undefined,