From 0fe76b5af89993ecc54247645adf83235ffaf830 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 23 Jun 2025 11:30:34 -0700 Subject: [PATCH] Enhancement: include ua for outlook ical integrations (#5444) --- src/widgets/calendar/proxy.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/widgets/calendar/proxy.js b/src/widgets/calendar/proxy.js index c98441eea..7330a97fa 100644 --- a/src/widgets/calendar/proxy.js +++ b/src/widgets/calendar/proxy.js @@ -16,7 +16,14 @@ export default async function calendarProxyHandler(req, res) { return res.status(403).json({ error: "No integration URL specified" }); } - const [status, contentType, data] = await httpProxy(integration.url); + const options = {}; + if (integration.url?.includes("outlook")) { + // Outlook requires a user agent header + options.headers = { + "User-Agent": `gethomepage/${process.env.NEXT_PUBLIC_VERSION || "dev"}`, + }; + } + const [status, contentType, data] = await httpProxy(integration.url, options); if (contentType) res.setHeader("Content-Type", contentType);