From 26a01f096e28018680da078ca7aa16b628d9ed68 Mon Sep 17 00:00:00 2001 From: Fenris Wolf Date: Tue, 19 May 2026 23:14:10 +0200 Subject: [PATCH] [fix] source:ics_feed:basic auth --- source/sources/ics_feed.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/sources/ics_feed.ts b/source/sources/ics_feed.ts index 420c2de..160e10b 100644 --- a/source/sources/ics_feed.ts +++ b/source/sources/ics_feed.ts @@ -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);