Remove unused variable

This commit is contained in:
Gabriel Ngandu-Biseba 2024-12-06 13:22:30 +01:00
parent 8b1556b0c7
commit ee6e130403
2 changed files with 1 additions and 15 deletions

View file

@ -20,9 +20,6 @@ const sslKeyPassphrase = args["ssl-key-passphrase"] || process.env.UPTIME_KUMA_S
const isSSL = sslKey && sslCert;
const mariaDbSslCert = args["UPTIME_KUMA_DB_SSL_CERT"] || process.env.UPTIME_KUMA_DB_CA_CERT || process.env.MARIADB_SSL_CERT || undefined;
const mariaDbUseSSL = mariaDbSslCert ? "true" : "false";
/**
* Get the local WebSocket URL
* @returns {string} The local WebSocket URL
@ -47,6 +44,4 @@ module.exports = {
isSSL,
localWebSocketURL,
demoMode,
mariaDbSslCert,
mariaDbUseSSL
};

View file

@ -7,7 +7,6 @@ const path = require("path");
const Database = require("./database");
const { allowDevAllOrigin } = require("./util-server");
const mysql = require("mysql2/promise");
const { mariaDbUseSSL, mariaDbSslCert } = require("./config");
/**
* A standalone express app that is used to setup a database
@ -234,15 +233,7 @@ class SetupDatabase {
// Test connection
try {
let sslConfig = null;
let serverCa = undefined;
if (mariaDbUseSSL === true && !dbConfig.ssl) {
dbConfig.caFilePath = mariaDbSslCert;
serverCa = [ fs.readFileSync(mariaDbSslCert, "utf8") ];
sslConfig = {
rejectUnauthorized: true,
ca: serverCa
};
} else if (dbConfig.ssl) {
if (dbConfig.ssl) {
sslConfig = dbConfig.ssl;
}