Hi all,
Don't know if this is supposed to go in the requests channel or in the servers channel. It fits in both.
Anyway...I have a weird problem. I've build an application which works fine locally in valet as well as sail. However, now that it's deployed (in a docker container), Laravel seems to forget all the session info sometimes. I tried to do dd(session()->all()) just to see what happens, and when I refresh, sometimes stuff shows up, and sometimes it doesn't. Also sometimes when I try to login (which obviously doesn't work also) or want to test my reset password form, it gives a 419 (because obviously, the CSRF token isn't correct because it forgot the session data). A refresh usually does the trick, because somehow, on some random requests all data is there, like everythings back to normal.
Anyone has any clue what could be happening here?
I tried setting secure cookies to false, tried to turn off encryption, made sure the session files could be written (and they can, because sometimes the data is there)...Currently, this is the content of config('session'):
[
"driver" => "file",
"lifetime" => 30,
"expire_on_close" => false,
"encrypt" => true,
"files" => "/var/www/html/storage/framework/sessions",
"connection" => null,
"table" => "sessions",
"store" => null,
"cookie" => "app_session", // instead of this, I have the real app name...
"path" => "/",
"domain" => ".app.com", // instead of this, I have the real domain name...
"secure" => true,
"http_only" => true,
"same_site" => "lax",
]