mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-25 21:54:16 -08:00
Remove unused variable
This commit is contained in:
parent
8b1556b0c7
commit
ee6e130403
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue