Fix cert import
This commit is contained in:
@ -45,10 +45,10 @@ passport.deserializeUser((user, cb) => {
|
|||||||
const run = async () => {
|
const run = async () => {
|
||||||
const secrets = await readYamlFile(process.env.SECRETS_FILE)
|
const secrets = await readYamlFile(process.env.SECRETS_FILE)
|
||||||
const redisOptions = (secrets) => {
|
const redisOptions = (secrets) => {
|
||||||
if (secrets.REDIS_URL?.startsWith('rediss://') && secrets.REDIS_CERT) {
|
if (secrets.REDIS_URL?.startsWith('rediss://') && process.env.REDIS_CERT) {
|
||||||
return {
|
return {
|
||||||
tls: {
|
tls: {
|
||||||
cert: secrets.REDIS_CERT,
|
cert: process.env.REDIS_CERT?.replace(/\\n/g, '\n'),
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: false,
|
||||||
},
|
},
|
||||||
maxRetriesPerRequest: null,
|
maxRetriesPerRequest: null,
|
||||||
@ -63,7 +63,7 @@ const run = async () => {
|
|||||||
tls: {
|
tls: {
|
||||||
host: secrets.REDIS_HOST,
|
host: secrets.REDIS_HOST,
|
||||||
port: secrets.REDIS_PORT,
|
port: secrets.REDIS_PORT,
|
||||||
cert: secrets.REDIS_CERT,
|
cert: process.env.REDIS_CERT?.replace(/\\n/g, '\n'),
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: false,
|
||||||
},
|
},
|
||||||
maxRetriesPerRequest: null,
|
maxRetriesPerRequest: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user