Skip to content
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

add AddQueuedCookiesToResponse to middlewarePriority so it is handled in the right place #46130

Merged
merged 2 commits into from
Feb 15, 2023

Conversation

s4muel
Copy link
Contributor

@s4muel s4muel commented Feb 15, 2023

Hi there, I was trying to set session storage to cookie, but the cookies with session data were not set at all. After a bit of search, this came up: #43693 and that is a perfect match, the queued cookies (https://github.com/laravel/framework/blob/10.x/src/Illuminate/Session/CookieSessionHandler.php#L101) never got sent back to the browser, because the middleware was handled in the wrong "place"

adding the middleware to the list so it is always in correct order seems to resolve this issue (and fixes #43693)
targets both 9.x and 10.x versions

… in the right place

Hi there, i was trying to set `session storage` to `cookie`, but the cookies were not set at all. after a bit of search, this came up: laravel#43693
and now i know what he meant. the queued cookies (https://github.com/laravel/framework/blob/10.x/src/Illuminate/Session/CookieSessionHandler.php#L101) never got sent back to the browser

adding the middleware to the list so it is priority-sorted seems to resolve this issue (and fixes laravel#43693)
targets both 9.x and 10.x versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Session Driver Cookie Middleware Ordering Issue
2 participants