mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
fix widgets without mappings
This commit is contained in:
parent
d999bb3f09
commit
ec8700f3e9
@ -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…
x
Reference in New Issue
Block a user