aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/lib/settings.ts
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 /apps/mobile/lib/settings.ts
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 'apps/mobile/lib/settings.ts')
-rw-r--r--apps/mobile/lib/settings.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/mobile/lib/settings.ts b/apps/mobile/lib/settings.ts
index 4399e04a..aa931b9e 100644
--- a/apps/mobile/lib/settings.ts
+++ b/apps/mobile/lib/settings.ts
@@ -15,6 +15,7 @@ const zSettingsSchema = z.object({
.optional()
.default("reader"),
showNotes: z.boolean().optional().default(false),
+ customHeaders: z.record(z.string(), z.string()).optional().default({}),
});
export type Settings = z.infer<typeof zSettingsSchema>;
@@ -34,6 +35,7 @@ const useSettings = create<AppSettingsState>((set, get) => ({
theme: "system",
defaultBookmarkView: "reader",
showNotes: false,
+ customHeaders: {},
},
},
setSettings: async (settings) => {