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
fix: support multiple cookies with the same name across different paths and domains (#14131)
* Initial plan
* Fix multiple cookies with same name but different paths/domains
- Add generate_cookie_key function to create unique keys from domain/path/name
- Extend cookies.get() to accept optional domain and path options in opts parameter
- Store cookies with unique keys to prevent overwrites
- Maintain backward compatibility with existing API usage
- Add comprehensive tests for new functionality
- Address review feedback from PR #14056
Co-authored-by: Rich-Harris <[email protected]>
* Format code and finalize cookie fix implementation
- Fix formatting issues with prettier
- Verify all tests pass including edge cases
- Confirm TypeScript type checking passes
- Complete implementation addresses all review feedback from PR #14056
Co-authored-by: Rich-Harris <[email protected]>
* Remove domain/path options from cookies.get() and implement 'most specific path wins' logic
Co-authored-by: Rich-Harris <[email protected]>
* Fix path specificity calculation in cookies.get() method
Co-authored-by: Rich-Harris <[email protected]>
* prettier
* update changeset
* fix
* return undefined, not the empty string, when getting a deleted cookie
* add changeset
* tweak
* add failing test for getAll
* fix `getAll` to match updated `get` behaviour
* copilot doesnt know about snake_case
* use a Map for new_cookies, it's better
* encode name
* Update packages/kit/src/runtime/server/cookie.js
* oops
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Rich-Harris <[email protected]>
Co-authored-by: Rich Harris <[email protected]>
Co-authored-by: Rich Harris <[email protected]>
0 commit comments