mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
Fix base64 encoding for basic auth in calendar
This commit is contained in:
parent
30c7a24fc2
commit
52584f36d7
@ -55,7 +55,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
|
|||||||
} else if (auth.method === "digest") {
|
} 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, httpsAgent: httpsAgent });
|
||||||
} else {
|
} else {
|
||||||
headers.Authorization = "Basic " + base64.encode(auth.user + ":" + auth.pass);
|
headers.Authorization = "Basic " + Buffer.from(auth.user + ":" + auth.pass).toString("base64");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fetcher === null) {
|
if (fetcher === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user