diff --git a/src/ts/storage/globalApi.ts b/src/ts/storage/globalApi.ts index ded319cd..9d5165f2 100644 --- a/src/ts/storage/globalApi.ts +++ b/src/ts/storage/globalApi.ts @@ -663,6 +663,7 @@ async function fetchWithCapacitor(url: string, arg: GlobalFetchArgs): Promise { try { const furl = !isTauri && !isNodeServer ? `${hubURL}/proxy2` : `/proxy2`; + arg.headers["Content-Type"] ??= arg.body instanceof URLSearchParams ? "application/x-www-form-urlencoded" : "application/json"; const headers = { "risu-header": encodeURIComponent(JSON.stringify(arg.headers)), "risu-url": encodeURIComponent(url),