fix: url of batch link can get to long with 414 http code (#2036)

This commit is contained in:
Meier Lukas
2025-01-21 11:03:16 +01:00
committed by GitHub
parent 7a2d97ba91
commit 73bbcfeee8

View File

@@ -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)"),
}),
}),