-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Which project does this relate to?
Start
Describe the bug
In Start 1.97, request headers and cookies from helper functions in @tanstack/start/server or vinxi/http (e.g. getWebRequest) are initially incomplete in server functions called in loaders/beforeLoad, breaking auth stuff.
When navigating/loading another page which will re-trigger beforeLoad, getWebRequest() returns the complete headers.
Your Example Website or App
https://github.com/dotnize/tss-webrequest-server-fn
https://tss-webrequest-server-fn.vercel.app/
Steps to Reproduce the Bug or Issue
- Clone repo and run dev
- Load any page. Headers returned and logged from server fn loader will be incomplete.
- Navigate to /test or /. Complete headers are now returned.
This is reproducible in dev and build.
Expected behavior
Complete headers are always returned by getWebRequest in 1.95.x
Screenshots or Videos
Screencast.From.2025-01-15.16-54-05.mp4
Platform
- OS: [Linux]
- Browser: [Chrome, Firefox]
Additional context
No response
sebasptsch, Enalmada, tinrab, Pagebakers, ssut and 4 more
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done