fix proxmox proxy post body parsing issue
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
ec929d5f90
commit
0cdb152a24
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
|
||||
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);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user