diff options
| author | Mohamed Bassem <me@mbassem.com> | 2026-01-11 18:29:46 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2026-01-11 18:30:01 +0000 |
| commit | b4dbc9ce5c078ab0440b3d81558eef2025adb880 (patch) | |
| tree | f23e81122b036c066edf44f87db99d9e9e2f6609 /apps | |
| parent | f4524ec7caddcfefa174d3cb84a9fe716cc4c212 (diff) | |
| download | karakeep-b4dbc9ce5c078ab0440b3d81558eef2025adb880.tar.zst | |
fix(mobile): add custom headers to card banners. fixes #2342
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/mobile/components/bookmarks/BookmarkCard.tsx | 15 |
1 files changed, 9 insertions, 6 deletions
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, |
