fix: safari cookie issue

This commit is contained in:
2026-01-13 19:19:00 -05:00
parent b612d12a51
commit 48f01b6171
4 changed files with 39 additions and 4 deletions

View File

@@ -44,6 +44,13 @@ export const api = createTRPCProxyClient<AppRouter>({
headers: () => {
const csrfToken = getCSRFToken();
return csrfToken ? { "x-csrf-token": csrfToken } : {};
},
// CRITICAL FOR SAFARI: Ensure cookies are sent and received
fetch(url, options) {
return fetch(url, {
...options,
credentials: "include" // Safari requires this for cookie handling
});
}
})
]