mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 14:58:47 +00:00
handle proxy methods other than GET
This commit is contained in:
parent
bc2025b3ba
commit
53149df5f1
2 changed files with 4 additions and 1 deletions
|
@ -10,7 +10,9 @@ export default async function genericProxyHandler(req, res) {
|
|||
|
||||
if (widget) {
|
||||
const url = new URL(formatApiCall(widget.type, { endpoint, ...widget }));
|
||||
const [status, contentType, data] = await httpProxy(url);
|
||||
const [status, contentType, data] = await httpProxy(url, {
|
||||
method: req.method,
|
||||
});
|
||||
|
||||
if (contentType) res.setHeader("Content-Type", contentType);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue