mirror of
https://github.com/gethomepage/homepage.git
synced 2026-04-13 13:41:21 -07:00
Fix: Await async proxy handlers (#6371)
This commit is contained in:
@@ -29,7 +29,7 @@ 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) {
|
||||
return serviceProxyHandler(req, res);
|
||||
return await serviceProxyHandler(req, res);
|
||||
}
|
||||
|
||||
// map opaque endpoints to their actual endpoint
|
||||
@@ -90,15 +90,15 @@ export default async function handler(req, res) {
|
||||
}
|
||||
|
||||
if (endpointProxy instanceof Function) {
|
||||
return endpointProxy(req, res, map);
|
||||
return await endpointProxy(req, res, map);
|
||||
}
|
||||
|
||||
return serviceProxyHandler(req, res, map);
|
||||
return await serviceProxyHandler(req, res, map);
|
||||
}
|
||||
|
||||
if (widget.allowedEndpoints instanceof RegExp) {
|
||||
if (widget.allowedEndpoints.test(req.query.endpoint)) {
|
||||
return serviceProxyHandler(req, res);
|
||||
return await serviceProxyHandler(req, res);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user