laravel-caffeine: Forms still expire
Expected Behavior
Forms stills alive
Actual Behavior
They expire
Details
Using the middleware method, all the drips get 204, no problem so far. The only thing I noted is that after the session time expiration, the XSRF-TOKEN cookie being sent for the drip disappears.
It seems that Laravel doesn’t want to maintain the token session alive in the form even if the drips are correctly sent and responded.
Already removed and reinstalled Caffeine and dumped the autoload juts to be sure.
Workaround
Using Axios, I made a normal get to the form located axios.get('https://myapp.test/login and the token lives throught the timeout . But using axios to the default dripping route doesn’t.
It would seem that Laravel session enforces the current URL, but after using get on other routes of the application (like axios.get('https://myapp.test/artist/michael-jackson/albums/all')) also keep them alive.
See updates.
Environment
- PHP Version: 7.2.4
- NGINX: 1.12.2
- Laravel Version: 5.6
- LaravelCaffeine Version: 0.6.8
Stack Trace
Unavailable.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (10 by maintainers)
Update 3 (This is weird)
Installed Caffeine, everything default.
I deleted the route declaration in
/routes/web.phpof this package:Then I added the default route in my
web.php, at root.Success. Forms doesn’t expire.
But it won’t work if the route is declared using the
web.phpof this package. That means that something is interfering with the route that Caffeine is declaring, but at glance everything is clean.But…
Moving the same code I added in my
web.phpto theroute/web.phppackage gives the same problem:With this, forms still expire.