diff --git a/playground/plugins/trpc-client.ts b/playground/plugins/trpc-client.ts index 51ab4fb..5dbb3f5 100644 --- a/playground/plugins/trpc-client.ts +++ b/playground/plugins/trpc-client.ts @@ -15,29 +15,6 @@ export default defineNuxtPlugin((nuxtApp) => { }), httpBatchLink({ url: 'http://localhost:3000/api/trpc', - /** - * Set custom request headers on every request from tRPC - * @link https://trpc.io/docs/ssr - */ - headers() { - if (nuxtApp.ssrContext?.event?.req) { - // To use SSR properly, you need to forward the client's headers to the server - // This is so you can pass through things like cookies when we're server-side rendering - - // If you're using Node 18, omit the "connection" header - const { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - connection: _connection, - ...headers - } = nuxtApp.ssrContext.event.req.headers - return { - ...headers, - // Optional: inform server that it's an SSR request - 'x-ssr': '1', - } - } - return {} - }, }), ], })