mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-09-12 00:39:06 +02:00
🚑 Fix crash if SSL is disable #43
This commit is contained in:
parent
768ae1d97f
commit
46ae0b7a77
@ -228,7 +228,8 @@ class WebdavTools {
|
|||||||
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
|
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
|
||||||
}
|
}
|
||||||
logger.debug(`...URI: ${encodeURI(this.baseUrl.replace(this.host, 'host.hiden') + path)}`);
|
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
|
got.stream
|
||||||
.put(encodeURI(this.baseUrl + path), options)
|
.put(encodeURI(this.baseUrl + path), options)
|
||||||
@ -327,7 +328,8 @@ class WebdavTools {
|
|||||||
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
|
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
|
||||||
}
|
}
|
||||||
logger.debug(`...URI: ${encodeURI(this.baseUrl.replace(this.host, 'host.hiden') + path)}`);
|
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(
|
pipeline(
|
||||||
got.stream.get(encodeURI(this.baseUrl + path), options)
|
got.stream.get(encodeURI(this.baseUrl + path), options)
|
||||||
.on("downloadProgress", (e) => {
|
.on("downloadProgress", (e) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user