mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-12-23 22:46:44 +01: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" };
|
||||
}
|
||||
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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user