From b4dbc9ce5c078ab0440b3d81558eef2025adb880 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sun, 11 Jan 2026 18:29:46 +0000
Subject: fix(mobile): add custom headers to card banners. fixes #2342

---
 apps/mobile/components/bookmarks/BookmarkCard.tsx | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

(limited to 'apps/mobile/components/bookmarks/BookmarkCard.tsx')

diff --git a/apps/mobile/components/bookmarks/BookmarkCard.tsx b/apps/mobile/components/bookmarks/BookmarkCard.tsx
index 66f23dc9..e2df31b9 100644
--- a/apps/mobile/components/bookmarks/BookmarkCard.tsx
+++ b/apps/mobile/components/bookmarks/BookmarkCard.tsx
@@ -16,6 +16,7 @@ import * as Sharing from "expo-sharing";
 import { Text } from "@/components/ui/Text";
 import useAppSettings from "@/lib/settings";
 import { api } from "@/lib/trpc";
+import { buildApiHeaders } from "@/lib/utils";
 import { MenuView } from "@react-native-menu/menu";
 import { Ellipsis, ShareIcon, Star } from "lucide-react-native";
 
@@ -124,9 +125,10 @@ function ActionBar({ bookmark }: { bookmark: ZBookmark }) {
                 assetUrl,
                 fileUri,
                 {
-                  headers: {
-                    Authorization: `Bearer ${settings.apiKey}`,
-                  },
+                  headers: buildApiHeaders(
+                    settings.apiKey,
+                    settings.customHeaders,
+                  ),
                 },
               );
 
@@ -319,9 +321,10 @@ function LinkCard({
           imageUrl.localAsset
             ? {
                 uri: `${settings.address}${imageUrl.url}`,
-                headers: {
-                  Authorization: `Bearer ${settings.apiKey}`,
-                },
+                headers: buildApiHeaders(
+                  settings.apiKey,
+                  settings.customHeaders,
+                ),
               }
             : {
                 uri: imageUrl.url,
-- 
cgit v1.2.3-70-g09d2

