Enhancement: include ua for outlook ical integrations (#5444)

This commit is contained in:
shamoon 2025-06-23 11:30:34 -07:00 committed by GitHub
parent e51db24418
commit 0fe76b5af8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);