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