Fixing fetch option httpsAgent to agent in calendar module (#466)

This commit is contained in:
config 2021-04-15 14:51:33 +02:00
parent ac27d05fd5
commit 5d99baac21
2 changed files with 3 additions and 2 deletions

View File

@ -31,6 +31,7 @@ _This release is scheduled to be released on 2021-04-01._
- Fix decimalSymbol in the forcast part of the new weather module #2530
- Fix wrong treatment of `appendLocationNameToHeader` when using `ukmetofficedatahub`
- Fix alert not recognizing multiple alerts (#2522)
- Fix fetch option httpsAgent to agent in calendar module (#466)
## [2.15.0] - 2021-04-01

View File

@ -52,13 +52,13 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
if (auth.method === "bearer") {
headers.Authorization = "Bearer " + auth.pass;
} else if (auth.method === "digest") {
fetcher = new digest(auth.user, auth.pass).fetch(url, { headers: headers, httpsAgent: httpsAgent });
fetcher = new digest(auth.user, auth.pass).fetch(url, { headers: headers, agent: httpsAgent });
} else {
headers.Authorization = "Basic " + Buffer.from(auth.user + ":" + auth.pass).toString("base64");
}
}
if (fetcher === null) {
fetcher = fetch(url, { headers: headers, httpsAgent: httpsAgent });
fetcher = fetch(url, { headers: headers, agent: httpsAgent });
}
fetcher