mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 06:08:48 +00:00
fix widgets without mappings
This commit is contained in:
parent
d999bb3f09
commit
ec8700f3e9
1 changed files with 29 additions and 25 deletions
|
@ -20,6 +20,7 @@ export default async function handler(req, res) {
|
|||
|
||||
if (serviceProxyHandler instanceof Function) {
|
||||
// map opaque endpoints to their actual endpoint
|
||||
if (widget?.mappings) {
|
||||
const mapping = widget?.mappings?.[req.query.endpoint];
|
||||
const mappingParams = mapping.params;
|
||||
const map = mapping?.map;
|
||||
|
@ -50,6 +51,9 @@ export default async function handler(req, res) {
|
|||
return serviceProxyHandler(req, res, map);
|
||||
}
|
||||
|
||||
return serviceProxyHandler(req, res);
|
||||
}
|
||||
|
||||
logger.debug("Unknown proxy service type: %s", type);
|
||||
return res.status(403).json({ error: "Unkown proxy service type" });
|
||||
} catch (ex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue