mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-26 06:04:13 -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 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
|
* Get the local WebSocket URL
|
||||||
* @returns {string} The local WebSocket URL
|
* @returns {string} The local WebSocket URL
|
||||||
|
@ -47,6 +44,4 @@ module.exports = {
|
||||||
isSSL,
|
isSSL,
|
||||||
localWebSocketURL,
|
localWebSocketURL,
|
||||||
demoMode,
|
demoMode,
|
||||||
mariaDbSslCert,
|
|
||||||
mariaDbUseSSL
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,6 @@ const path = require("path");
|
||||||
const Database = require("./database");
|
const Database = require("./database");
|
||||||
const { allowDevAllOrigin } = require("./util-server");
|
const { allowDevAllOrigin } = require("./util-server");
|
||||||
const mysql = require("mysql2/promise");
|
const mysql = require("mysql2/promise");
|
||||||
const { mariaDbUseSSL, mariaDbSslCert } = require("./config");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A standalone express app that is used to setup a database
|
* A standalone express app that is used to setup a database
|
||||||
|
@ -234,15 +233,7 @@ class SetupDatabase {
|
||||||
// Test connection
|
// Test connection
|
||||||
try {
|
try {
|
||||||
let sslConfig = null;
|
let sslConfig = null;
|
||||||
let serverCa = undefined;
|
if (dbConfig.ssl) {
|
||||||
if (mariaDbUseSSL === true && !dbConfig.ssl) {
|
|
||||||
dbConfig.caFilePath = mariaDbSslCert;
|
|
||||||
serverCa = [ fs.readFileSync(mariaDbSslCert, "utf8") ];
|
|
||||||
sslConfig = {
|
|
||||||
rejectUnauthorized: true,
|
|
||||||
ca: serverCa
|
|
||||||
};
|
|
||||||
} else if (dbConfig.ssl) {
|
|
||||||
sslConfig = dbConfig.ssl;
|
sslConfig = dbConfig.ssl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue