|
|
|
@ -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) {
|
|
|
|
|