This commit is contained in:
Benjamin Toby
2024-01-18 11:10:53 +01:00
parent cee56d9480
commit 0e95334ef7
3 changed files with 21 additions and 3 deletions
+10 -1
View File
@@ -33,7 +33,16 @@ const connection = mysql.createConnection({
: undefined,
timeout: 5000,
ssl: {
ca: fs.readFileSync(process.env.DSQL_SSL_CA_PATH || ""),
ca: (() => {
try {
if (process.env.DSQL_SSL_CA_PATH) {
return fs.readFileSync(process.env.DSQL_SSL_CA_PATH);
}
return undefined;
} catch (error) {
return undefined;
}
})(),
},
});
+10 -1
View File
@@ -15,7 +15,16 @@ const connection = mysql.createConnection({
: undefined,
timeout: 5000,
ssl: {
ca: fs.readFileSync(process.env.DSQL_SSL_CA_PATH || ""),
ca: (() => {
try {
if (process.env.DSQL_SSL_CA_PATH) {
return fs.readFileSync(process.env.DSQL_SSL_CA_PATH);
}
return undefined;
} catch (error) {
return undefined;
}
})(),
},
});