🚑 Fix self signed certificate #27

This commit is contained in:
SebClem 2020-10-14 18:34:11 +02:00
parent 75cc45a65e
commit a0a31e3bf7

View File

@ -31,7 +31,7 @@ class WebdavTools {
this.password = password;
let agent_option = ssl === "true" ? { rejectUnauthorized: accept_selfsigned_cert === "false" } : {}
try {
this.client = createClient(this.baseUrl, { username: username, password: password }, new https.Agent(agent_option));
this.client = createClient(this.baseUrl, { username: username, password: password, httpsAgent: new https.Agent(agent_option) }) ;
this.client.getDirectoryContents("/").then(() => {
if (status.error_code == 3) {