From 62eca6c427d61c30d4c2dc3575c06475e27bf932 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Fri, 24 Feb 2023 22:34:19 +0000 Subject: [PATCH] fix proxmox proxy post body parsing issue Signed-off-by: Arthur Lu --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f9ad23e..67456de 100644 --- a/index.js +++ b/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 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); });