A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix(mobile): add custom headers to card banners. fixes #2342
Mohamed Bassemb4dbc9ce5c07
diff --git a/apps/mobile/components/bookmarks/BookmarkCard.tsx b/apps/mobile/components/bookmarks/BookmarkCard.tsxindex 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,