From cbdbd95e8114877619844cebb57fc59b8aabda44 Mon Sep 17 00:00:00 2001 From: Radiquum Date: Sun, 16 Mar 2025 03:02:44 +0500 Subject: [PATCH] debug --- middleware.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/middleware.ts b/middleware.ts index baffe1c..fffdb13 100644 --- a/middleware.ts +++ b/middleware.ts @@ -179,11 +179,16 @@ export default async function middleware( // }); // } + const params = await request.json() + const formData = new FormData(); - for (const [key, value] of Object.entries(await request.json())) { + for (const [key, value] of Object.entries(params)) { formData.append(key as any, value as any); } + console.log("get JSON:", params); + console.log("send FORM:", formData); + const response = await fetch(`https://${path}`, { method: "POST", body: formData,