fix: auth

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-10-18 11:33:25 +02:00
parent 967a155d5e
commit 95de29dfed
4 changed files with 4 additions and 10 deletions

View File

@@ -9,16 +9,12 @@ import { createIsomorphicFn } from '@tanstack/react-start';
import { getRequestHeaders } from '@tanstack/react-start/server';
import { useMemo } from 'react';
type Headers = ReturnType<typeof getRequestHeaders>;
export const getIsomorphicHeaders = createIsomorphicFn()
.server(() => {
return getRequestHeaders();
})
.client(() => {
const headers = new Headers();
headers.set('content-type', 'application/json');
return headers as Headers;
return {};
});
// Create a function that returns a tRPC client with optional cookies