jeudi 20 juin 2019

Sub domain specific configurations. Browser,Cache, Cookies, CSRF Token

On Laravel 5.5 we have a enterprise system that separates authenticated users and public users. These two URLs are on same domain with additional sub domain to it. Both of these servers MUST have separate app_key, db_database and few other parameters from .env file.

Now, if I open both of these subdomains in one browser two different tabs, one fails surely and throws whoops unserialize(): Error at offset 0 of 40 bytes

Reason being, .env variables go to PHP super global and XSRF-TOKEN, cookies names conflict somewhere.

  • I tried to use different env variables but still it fails.
  • Tried Session.php - "same_site" => "strict", No luck
  • Being public site cannot disable X-CSRF
  • Tried to rename cookie names in laravel, no luck.


from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2IQK6o8
via IFTTT

Aucun commentaire:

Enregistrer un commentaire