🚑 Fix crash if SSL is disable #43

This commit is contained in:
SebClem 2021-01-14 18:22:56 +01:00
parent 768ae1d97f
commit 46ae0b7a77

View File

@ -228,7 +228,8 @@ class WebdavTools {
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
}
logger.debug(`...URI: ${encodeURI(this.baseUrl.replace(this.host, 'host.hiden') + path)}`);
logger.debug(`...rejectUnauthorized: ${options["https"]["rejectUnauthorized"]}`);
if (conf.ssl === "true")
logger.debug(`...rejectUnauthorized: ${options["https"]["rejectUnauthorized"]}`);
got.stream
.put(encodeURI(this.baseUrl + path), options)
@ -327,7 +328,8 @@ class WebdavTools {
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
}
logger.debug(`...URI: ${encodeURI(this.baseUrl.replace(this.host, 'host.hiden') + path)}`);
logger.debug(`...rejectUnauthorized: ${options["https"]["rejectUnauthorized"]}`);
if (conf.ssl === "true")
logger.debug(`...rejectUnauthorized: ${options["https"]["rejectUnauthorized"]}`);
pipeline(
got.stream.get(encodeURI(this.baseUrl + path), options)
.on("downloadProgress", (e) => {