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
Session lost on redirect to other controller #771
Comments
First, no need to await while putting on session, session values are persisted in bulk when the request ends. |
Mind sharing a complete code example. Also please do format your code blocks properly. Since it is hard to read the code otherwise |
It's redirect to same domain but different controller only
I want to a success message to BarController.index via session In QuxController store function
In BarController index function
But I can get the session if redirect from BarController |
May I know how you visit the |
It's a form submit from other view. |
Seems to be working fine for me. Also |
What session drivers are you using? Can you manually commit session like that to see if values are persisted in bulk:
|
I am using cookie as session drive. |
Normally the session should be persisted automatically.
OR
|
There doesn't seems to be any issues with the session. I suggest sharing a repo with minimal code to reproduce the issue |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Flow:
I set a session using
await session.put('message', { test: 'TEST' })
in A Controllerand
return response.redirect( Route.url('xxxxxx' )
to B ControllerUsing
session.pull('message')
in B Controller is nullin config/session.js
The text was updated successfully, but these errors were encountered: