mirror of
https://github.com/gethomepage/homepage.git
synced 2025-07-09 03:04:18 -04:00
Enhancement: include ua for outlook ical integrations (#5444)
This commit is contained in:
parent
e51db24418
commit
0fe76b5af8
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user