diff options
| author | kamtschatka <simon.schatka@gmx.at> | 2024-07-13 14:39:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-13 13:39:25 +0100 |
| commit | a2225648a2a03887b2c6dba157257bb3099d4ef8 (patch) | |
| tree | 439f53d30d701cb724eaeb1ee6bb636b3bddcd19 /apps | |
| parent | 1396dd26118afecb199fff1bab896454e291c80e (diff) | |
| download | karakeep-a2225648a2a03887b2c6dba157257bb3099d4ef8.tar.zst | |
fix: Fix TRPC batchign failure because of long URLs. Fixes #281 (#291)
limiting the length of the URL for batched requests to prevent 431 errors
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/cli/src/lib/trpc.ts | 1 | ||||
| -rw-r--r-- | apps/web/lib/providers.tsx | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/apps/cli/src/lib/trpc.ts b/apps/cli/src/lib/trpc.ts index aa7aec21..27082b10 100644 --- a/apps/cli/src/lib/trpc.ts +++ b/apps/cli/src/lib/trpc.ts @@ -10,6 +10,7 @@ export function getAPIClient() { links: [ httpBatchLink({ url: `${globals.serverAddr}/api/trpc`, + maxURLLength: 14000, transformer: superjson, headers() { return { diff --git a/apps/web/lib/providers.tsx b/apps/web/lib/providers.tsx index 9c937281..b4066808 100644 --- a/apps/web/lib/providers.tsx +++ b/apps/web/lib/providers.tsx @@ -68,6 +68,7 @@ export default function Providers({ httpBatchLink({ // TODO: Change this to be a full URL exposed as a client side setting url: `/api/trpc`, + maxURLLength: 14000, transformer: superjson, }), ], |
