Merge changes from fork

This commit is contained in:
shamoon
2026-09-01 20:25:13 -07:00
parent 81accd8dbe
commit d907ca1d0e
2 changed files with 234 additions and 1 deletions
+5 -1
View File
@@ -63,6 +63,8 @@ export default async function handler(req, res) {
if (serviceProxyHandler instanceof Function) {
// quick return for no endpoint services, calendar is an exception
if (!req.query.endpoint || serviceProxyHandler === calendarProxyHandler) {
req.method = "GET";
req.body = undefined;
return await serviceProxyHandler(req, res);
}
@@ -86,7 +88,7 @@ export default async function handler(req, res) {
}
req.method = mapping?.method || "GET";
if (mapping?.body) req.body = mapping?.body;
req.body = mapping?.body;
req.query.endpoint = endpoint;
if (mapping.segments || req.query.segments) {
@@ -125,6 +127,8 @@ export default async function handler(req, res) {
if (widget.allowedEndpoints instanceof RegExp) {
if (widget.allowedEndpoints.test(req.query.endpoint)) {
req.method = "GET";
req.body = undefined;
return await serviceProxyHandler(req, res);
}
}