aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-11-08 18:04:46 +0000
committerGitHub <noreply@github.com>2025-11-08 18:04:46 +0000
commitec621bf55aefda6649ce49d7ece6065ab2c54368 (patch)
tree36511cd55f4c3246d7dcca20c7f6c65517ee9ab1 /packages
parent27ed0a198f5c427c7044b1a24deade6054d89dac (diff)
downloadkarakeep-ec621bf55aefda6649ce49d7ece6065ab2c54368.tar.zst
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 <noreply@anthropic.com>
Diffstat (limited to 'packages')
-rw-r--r--packages/shared-react/providers/trpc-provider.tsx2
1 files changed, 2 insertions, 0 deletions
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<string, string>;
}
function getTRPCClient(settings: Settings) {
@@ -21,6 +22,7 @@ function getTRPCClient(settings: Settings) {
Authorization: settings.apiKey
? `Bearer ${settings.apiKey}`
: undefined,
+ ...settings.customHeaders,
};
},
transformer: superjson,