fix proxmox proxy post body parsing issue
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
ce8a4f29fa
commit
62eca6c427
2
index.js
2
index.js
@ -40,7 +40,7 @@ app.get("/api/proxmox/*", async (req, res) => { // proxy endpoint for GET proxmo
|
|||||||
|
|
||||||
app.post("/api/proxmox/*", async (req, res) => { // proxy endpoint for POST proxmox api with no token
|
app.post("/api/proxmox/*", async (req, res) => { // proxy endpoint for POST proxmox api with no token
|
||||||
path = req.url.replace("/api/proxmox", "");
|
path = req.url.replace("/api/proxmox", "");
|
||||||
let result = await requestPVE(path, "POST", req.cookies, req.body);
|
let result = await requestPVE(path, "POST", req.cookies, JSON.stringify(req.body)); // need to stringify body because of other issues
|
||||||
res.send(result.data, result.status);
|
res.send(result.data, result.status);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user