You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to set multiple cookies in a server handler using setCookie, only the last cookie gets actually set in the browser. All previous setCookie calls seem to be overridden or ignored.
Open DevTools → Network tab → Select the request to /api/set-cookies.
Check the "Set-Cookie" headers in the Response Headers.
You will see that only the last cookie is set.
Expected behavior
As a user, I expected multiple Set-Cookie headers to be sent and both cookies to be set, but I am seeing only the last one is applied. The previous one is missing.
Screenshots or Videos
CleanShot.2025-10-13.at.17.46.16.mp4
Platform
Router / Start Version: [e.g. 1.121.0]
OS: [macOS]
Browser: [Chrome]
Browser Version: [140.0.7339.214]
Bundler: [vite]
Bundler Version: [7.1.7]
Additional context
This bug happens consistently and prevents setting multiple cookies for auth/session scenarios. Possibly related to how Response headers are managed in TanStack Start server handlers.
Which project does this relate to?
Start
Describe the bug
When trying to set multiple cookies in a server handler using setCookie, only the last cookie gets actually set in the browser. All previous setCookie calls seem to be overridden or ignored.
Your Example Website or App
https://github.com/Mr-Alexandre/bug-repro-tanstack-start-cookie
Steps to Reproduce the Bug or Issue
pnpm dev)./api/set-cookies.Expected behavior
As a user, I expected multiple Set-Cookie headers to be sent and both cookies to be set, but I am seeing only the last one is applied. The previous one is missing.
Screenshots or Videos
CleanShot.2025-10-13.at.17.46.16.mp4
Platform
Additional context
This bug happens consistently and prevents setting multiple cookies for auth/session scenarios. Possibly related to how Response headers are managed in TanStack Start server handlers.