[fix] source:ics_feed:basic auth
This commit is contained in:
parent
b24e776a06
commit
26a01f096e
|
|
@ -48,7 +48,19 @@ namespace _munin.sources.ics_feed
|
|||
"version": "HTTP/2",
|
||||
"method": lib_plankton.http.enum_method.get,
|
||||
"query": ("?" + url.query),
|
||||
"headers": {},
|
||||
"headers": (
|
||||
((url.username !== null) && (url.password !== null))
|
||||
?
|
||||
{
|
||||
/**
|
||||
* @todo use lib_plankton.base64
|
||||
*/
|
||||
"Authorization": ("Basic " + Buffer.from(url.username + ":" + url.password).toString("base64")),
|
||||
}
|
||||
:
|
||||
{
|
||||
}
|
||||
),
|
||||
"body": null,
|
||||
};
|
||||
const http_response : lib_plankton.http.type_response = await lib_plankton.http.call(http_request);
|
||||
|
|
|
|||
Loading…
Reference in a new issue