From 73bbcfeee86bf0950145070a6a2ce528b708fe7c Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Tue, 21 Jan 2025 11:03:16 +0100 Subject: [PATCH] fix: url of batch link can get to long with 414 http code (#2036) --- apps/nextjs/src/app/[locale]/_client-providers/trpc.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/nextjs/src/app/[locale]/_client-providers/trpc.tsx b/apps/nextjs/src/app/[locale]/_client-providers/trpc.tsx index 3d2042030..2588cf44a 100644 --- a/apps/nextjs/src/app/[locale]/_client-providers/trpc.tsx +++ b/apps/nextjs/src/app/[locale]/_client-providers/trpc.tsx @@ -94,6 +94,7 @@ export function TRPCReactProvider(props: PropsWithChildren) { false: unstable_httpBatchStreamLink({ transformer: superjson, url: getTrpcUrl(), + maxURLLength: 2083, // Suggested by tRPC: https://trpc.io/docs/client/links/httpBatchLink#setting-a-maximum-url-length headers: createHeadersCallbackForSource("nextjs-react (json)"), }), }),