1

I am having an issue with Chrome and the "samesite" property on my cookies (I am logging in via PHP on a cloud server, then using resources on my cloud server in another domain)

On the cookies I am creating myself, I can do:

setcookie("foo", "bar", [
   "expires" => time() + 60 * 60 * 24,
   "path" => "/",
   "domain" => "", 
   "secure" => true,
   "httponly" => false,
   "samesite" => 'None'
  ]);

And this works.

My question is, is there any way to add "samesite" => 'None' on my "PHPSESSID" session cookie as well, so I can use the session from a cross domain page?

This is a chrome specific issue

ControlAltDel
  • 33,923
  • 10
  • 53
  • 80

1 Answers1

1

You can configure it by changing session.cookie_samesite inside php.ini.

Details here

Eduard
  • 1,319
  • 6
  • 12