From a2225648a2a03887b2c6dba157257bb3099d4ef8 Mon Sep 17 00:00:00 2001
From: kamtschatka <simon.schatka@gmx.at>
Date: Sat, 13 Jul 2024 14:39:25 +0200
Subject: 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
---
 packages/shared-react/providers/trpc-provider.tsx | 1 +
 1 file changed, 1 insertion(+)

(limited to 'packages/shared-react/providers/trpc-provider.tsx')

diff --git a/packages/shared-react/providers/trpc-provider.tsx b/packages/shared-react/providers/trpc-provider.tsx
index 73e19b09..5df819bb 100644
--- a/packages/shared-react/providers/trpc-provider.tsx
+++ b/packages/shared-react/providers/trpc-provider.tsx
@@ -15,6 +15,7 @@ function getTRPCClient(settings: Settings) {
     links: [
       httpBatchLink({
         url: `${settings.address}/api/trpc`,
+        maxURLLength: 14000,
         headers() {
           return {
             Authorization: settings.apiKey
-- 
cgit v1.2.3-70-g09d2

