From 6f93fe2cc773acfa7c46a3b6bf251990ebbf194d Mon Sep 17 00:00:00 2001 From: Rizky Date: Wed, 7 Feb 2024 18:16:28 +0700 Subject: [PATCH] wip fix --- app/web/src/base/load/proxy.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/web/src/base/load/proxy.ts b/app/web/src/base/load/proxy.ts index ecee6e7d..96e2c4ff 100644 --- a/app/web/src/base/load/proxy.ts +++ b/app/web/src/base/load/proxy.ts @@ -68,15 +68,16 @@ export const fetchViaProxy = async ( data instanceof File || (Array.isArray(data) && data[0] instanceof File) ) { + const target = new URL(url); if (data instanceof File) { - const res = await fetch(url, { + const res = await fetch(target.pathname, { body: data, method: "POST", headers: _headers, }); return await res.text(); } else { - const res = await fetch(url, { + const res = await fetch(target.pathname, { body: data[0], method: "POST", headers: _headers,