mirror of
https://github.com/gethomepage/homepage.git
synced 2026-10-19 00:41:45 -07:00
Merge changes from fork
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user