Hello,
I have an application and depending on the url I am flipping a session value. That session value is important to define what should be showed.
Now when the user opens the website it seems like the session is everytime changed (?). If I am using dump(session()->getId()); I am getting a different Session code each time.
After the page is loaded automatically an Ajax call is done to the server. If I use the same code in the Ajax call on the server side, I am getting exactly the same sessionID back everytime the Ajax call gets done. Exactly what I expect. The problem is only that the website and Ajax sessions do not match at all. So the value that gets set by the website is not the one that the Ajax call is reading -> hence resulting into strange output.
The whole website is HTTPS and my settings are:
driver = file, lifetime = 1000, expire_on_close = false, encrypt = true, domain = null, secure = true, http_only = true.
In the AppServiceProvider_boot I have the following code:
\URL::forceScheme('https');
The request cookies and headers are exactly the same (on XSRF_token, laravel_session, Cookie, etc).
Please help, I have no clue how to continue to fix or troubleshoot this.