This commit is contained in:
Sebastien Clement 2020-11-17 21:08:25 +01:00
commit 830f8d6fd5
2 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,8 @@
], ],
"boot": "auto", "boot": "auto",
"hassio_api": true, "hassio_api": true,
"hassio_role": "backup", "hassio_role": "manager",
"homeassistant_api": true,
"options": { "options": {
"ssl": false, "ssl": false,
"certfile": "fullchain.pem", "certfile": "fullchain.pem",

View File

@ -216,6 +216,7 @@ class WebdavTools {
if (conf.ssl === "true") { if (conf.ssl === "true") {
options["https"] = { rejectUnauthorized: conf.self_signed === "false" }; options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
} }
logger.debug(`...URI: ${this.baseUrl + encodeURI(path)} rejectUnauthorized: ${options["https"]["rejectUnauthorized"]}`);
got.stream got.stream
.put(this.baseUrl + encodeURI(path), options) .put(this.baseUrl + encodeURI(path), options)
@ -310,7 +311,7 @@ class WebdavTools {
if (conf.ssl === "true") { if (conf.ssl === "true") {
options["https"] = { rejectUnauthorized: conf.self_signed === "false" }; options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
} }
logger.debug(`...URI: ${this.baseUrl + encodeURI(path)} rejectUnauthorized: ${options["https"]["rejectUnauthorized"]}`)
pipeline( pipeline(
got.stream.get(this.baseUrl + encodeURI(path), options).on("downloadProgress", (e) => { got.stream.get(this.baseUrl + encodeURI(path), options).on("downloadProgress", (e) => {
let percent = Math.round(e.percent * 100) / 100; let percent = Math.round(e.percent * 100) / 100;