// This is not forwarding the client headers.
export const trpc = createTRPCProxyClient<IAppRouter>({
links: [
httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
headers() {
// how to forward client headers?
const heads = new Map(); // <-- specifically this part
return Object.fromEntries(heads);
},
}),
],
});
// This is not forwarding the client headers.
export const trpc = createTRPCProxyClient<IAppRouter>({
links: [
httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
headers() {
// how to forward client headers?
const heads = new Map(); // <-- specifically this part
return Object.fromEntries(heads);
},
}),
],
});