Cookies in universal load function
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the problem
Currently cookies are only available in +page.server.ts and +layout.server.ts but not in the universal load variants.
Describe the proposed solution
Make cookies available in universal load(). Only cookies with httpOnly disabled may be accessed, so that the universal load() function behaves the same in whichever environment it is executed.
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how cookies are exposed to +page.server.ts and +layout.server.ts, then compare that with the universal load variants described in the issue. Verify the handling of httpOnly cookies across server and client execution, and consider tests covering both environments. Done means universal load() can access non-httpOnly cookies consistently without exposing protected cookies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100