From b86fdd0996aabb9d7ab542d95dd2cc202f9b9dfd Mon Sep 17 00:00:00 2001 From: in-voker <58696565+in-voker@users.noreply.github.com> Date: Fri, 16 Jan 2026 19:15:13 +0100 Subject: [PATCH 1/2] Switch to undici Agent for HTTPS requests Replace https.Agent with undici's Agent for handling self-signed certificates. --- modules/default/calendar/calendarfetcher.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 2b29bfc705..73d595ee5a 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -1,8 +1,8 @@ -const https = require("node:https"); const ical = require("node-ical"); const Log = require("logger"); const CalendarFetcherUtils = require("./calendarfetcherutils"); const { getUserAgent } = require("#server_functions"); +const { Agent } = require('undici'); const FIFTEEN_MINUTES = 15 * 60 * 1000; const THIRTY_MINUTES = 30 * 60 * 1000; @@ -74,8 +74,12 @@ class CalendarFetcher { const options = { headers }; if (this.selfSignedCert) { - options.agent = new https.Agent({ rejectUnauthorized: false }); - } + options.dispatcher = new Agent({ + connect: { + rejectUnauthorized: false + } + }); + } if (this.auth) { if (this.auth.method === "bearer") { From dbc108987b369bbb8a04e790c957ca53a498f890 Mon Sep 17 00:00:00 2001 From: Thomas Seifert Date: Sat, 17 Jan 2026 17:59:50 +0100 Subject: [PATCH 2/2] fix linting issues --- modules/default/calendar/calendarfetcher.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 73d595ee5a..cb6cff6773 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -1,8 +1,9 @@ const ical = require("node-ical"); const Log = require("logger"); +const { Agent } = require("undici"); const CalendarFetcherUtils = require("./calendarfetcherutils"); const { getUserAgent } = require("#server_functions"); -const { Agent } = require('undici'); + const FIFTEEN_MINUTES = 15 * 60 * 1000; const THIRTY_MINUTES = 30 * 60 * 1000; @@ -74,12 +75,12 @@ class CalendarFetcher { const options = { headers }; if (this.selfSignedCert) { - options.dispatcher = new Agent({ - connect: { - rejectUnauthorized: false - } - }); - } + options.dispatcher = new Agent({ + connect: { + rejectUnauthorized: false + } + }); + } if (this.auth) { if (this.auth.method === "bearer") {