From d3275207bd148a179eadacdb7f20ff25b7c3e805 Mon Sep 17 00:00:00 2001 From: billisdead Date: Sat, 16 May 2026 12:42:00 +0200 Subject: [PATCH] fix: revert incorrect Bearer prefix on Authorization header Commit 39d5e5d added `Bearer ${apiKey}` to the axios client but this Postiz instance expects the raw API key with no prefix. Reverting to the original format that was confirmed working in the initial commit. Same fix applied to the image upload header in compose.tsx. Co-Authored-By: Claude Sonnet 4.6 --- artifacts/postiz-mobile/app/(tabs)/compose.tsx | 2 +- artifacts/postiz-mobile/context/PostizContext.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/artifacts/postiz-mobile/app/(tabs)/compose.tsx b/artifacts/postiz-mobile/app/(tabs)/compose.tsx index 6623b75..c850387 100644 --- a/artifacts/postiz-mobile/app/(tabs)/compose.tsx +++ b/artifacts/postiz-mobile/app/(tabs)/compose.tsx @@ -95,7 +95,7 @@ export default function ComposeScreen() { } const uploadRes = await expoFetch(`${baseUrl}/upload`, { method: "POST", - headers: { Authorization: `Bearer ${apiKey}` }, + headers: { Authorization: apiKey }, body: formData, }); const data = await uploadRes.json() as PostizUploadResult; diff --git a/artifacts/postiz-mobile/context/PostizContext.tsx b/artifacts/postiz-mobile/context/PostizContext.tsx index 64bb15f..fc42877 100644 --- a/artifacts/postiz-mobile/context/PostizContext.tsx +++ b/artifacts/postiz-mobile/context/PostizContext.tsx @@ -67,7 +67,7 @@ function createClient(apiKey: string, baseUrl: string): AxiosInstance { const instance = axios.create({ baseURL: normalizedUrl, headers: { - Authorization: `Bearer ${apiKey}`, + Authorization: apiKey, "Content-Type": "application/json", }, timeout: 15000,