From ec621bf55aefda6649ce49d7ece6065ab2c54368 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sat, 8 Nov 2025 18:04:46 +0000 Subject: feat(mobile): add custom headers configuration in sign-in screen (#2103) * feat(mobile): add custom headers configuration in sign-in screen Add ability for mobile app users to configure custom HTTP headers that are sent with every API request. This enables users to add authentication headers, proxy headers, or other custom headers required by their server setup. Changes: - Add customHeaders field to mobile app settings schema - Create CustomHeadersModal component for managing headers - Update sign-in screen with link to configure custom headers - Modify tRPC provider to merge custom headers with Authorization header The custom headers are stored securely in the app settings and persist across sessions. * fix keyboard * add custom headers to other callsites --------- Co-authored-by: Claude --- packages/shared-react/providers/trpc-provider.tsx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/shared-react') diff --git a/packages/shared-react/providers/trpc-provider.tsx b/packages/shared-react/providers/trpc-provider.tsx index 5df819bb..696bf195 100644 --- a/packages/shared-react/providers/trpc-provider.tsx +++ b/packages/shared-react/providers/trpc-provider.tsx @@ -8,6 +8,7 @@ import { api } from "../trpc"; interface Settings { apiKey?: string; address: string; + customHeaders?: Record; } function getTRPCClient(settings: Settings) { @@ -21,6 +22,7 @@ function getTRPCClient(settings: Settings) { Authorization: settings.apiKey ? `Bearer ${settings.apiKey}` : undefined, + ...settings.customHeaders, }; }, transformer: superjson, -- cgit v1.2.3-70-g09d2