mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
Enhancement: Add requestBody param for customapi (#2921)
This commit is contained in:
@@ -35,6 +35,12 @@ export default async function genericProxyHandler(req, res, map) {
|
||||
};
|
||||
if (req.body) {
|
||||
params.body = req.body;
|
||||
} else if (widget.requestBody) {
|
||||
if (typeof widget.requestBody === "object") {
|
||||
params.body = JSON.stringify(widget.requestBody);
|
||||
} else {
|
||||
params.body = widget.requestBody;
|
||||
}
|
||||
}
|
||||
|
||||
const [status, contentType, data] = await httpProxy(url, params);
|
||||
|
||||
Reference in New Issue
Block a user