diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 2b29bfc705..cb6cff6773 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -1,9 +1,10 @@ -const https = require("node:https"); const ical = require("node-ical"); const Log = require("logger"); +const { Agent } = require("undici"); const CalendarFetcherUtils = require("./calendarfetcherutils"); const { getUserAgent } = require("#server_functions"); + const FIFTEEN_MINUTES = 15 * 60 * 1000; const THIRTY_MINUTES = 30 * 60 * 1000; const MAX_SERVER_BACKOFF = 3; @@ -74,7 +75,11 @@ 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) {