Add SSL certificate for local server

This commit is contained in:
Benjamin Toby 2024-01-14 09:18:46 +01:00
parent 36ccd43fc3
commit cee56d9480
3 changed files with 10 additions and 2 deletions

View File

@ -32,6 +32,9 @@ const connection = mysql.createConnection({
? parseInt(process.env.DSQL_PORT)
: undefined,
timeout: 5000,
ssl: {
ca: fs.readFileSync(process.env.DSQL_SSL_CA_PATH || ""),
},
});
//////////////////////////////////////////////////////////////////////////////////

View File

@ -10,8 +10,13 @@ const connection = mysql.createConnection({
user: process.env.DSQL_USER,
password: process.env.DSQL_PASS,
charset: "utf8mb4",
port: process.env.DSQL_PORT?.match(/.../) ? parseInt(process.env.DSQL_PORT) : undefined,
port: process.env.DSQL_PORT?.match(/.../)
? parseInt(process.env.DSQL_PORT)
: undefined,
timeout: 5000,
ssl: {
ca: fs.readFileSync(process.env.DSQL_SSL_CA_PATH || ""),
},
});
/**

View File

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