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

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;
}
})(),
},
});

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;
}
})(),
},
});

View File

@ -1,6 +1,6 @@
{
"name": "datasquirel",
"version": "1.9.7",
"version": "1.9.8",
"description": "Cloud-based SQL data management tool",
"main": "index.js",
"bin": {