Enhancement: include ua for outlook ical integrations (#5444)
Some checks failed
Crowdin Action / Crowdin Sync (push) Has been cancelled
Docker CI / Linting Checks (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Repository Maintenance / Stale (push) Has been cancelled
Repository Maintenance / Lock Old Threads (push) Has been cancelled
Repository Maintenance / Close Answered Discussions (push) Has been cancelled
Repository Maintenance / Close Outdated Discussions (push) Has been cancelled
Repository Maintenance / Close Unsupported Feature Requests (push) Has been cancelled

This commit is contained in:
shamoon
2025-06-23 11:30:34 -07:00
committed by GitHub
parent e51db24418
commit 0fe76b5af8

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