-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: session regeneration #12864
fix: session regeneration #12864
Conversation
🦋 Changeset detectedLatest commit: 943d49f The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #12864 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a new test (or update the existing ones)?
The existing tests are unit only - this is why they pass, as they don't model the interaction with the request rendering/cookie setting process. If you can point me at an example of a simple existing SSR / cookie setting & checking test, I can give it a shot. |
@ematipico added a test that fails on main but succeeds on this branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
Changes
Ensures that session IDs get regenerated when
regenerate()
is called. This fixes #12863.pnpm exec changeset
Testing
Built astro with this change locally and ran it against https://stackblitz.com/edit/github-muwk6ati-gxwf5xkb?file=src%2Fpages%2Findex.astro and it functions as expected (new uuid shown on every refresh).
Docs
Docs should not be needed - this aligns the code's functionality with the current docs.