PHP SameSite session problem, session doesn't work

后端 未结 6 1645
醉梦人生
醉梦人生 2021-02-15 18:34

I hope anybody can give me some ideas to my problem. I am trying to apply SameSite cookie to make session work but it seems it doesn\'t work. The visited site html:



        
6条回答
  •  面向向阳花
    2021-02-15 18:53

    I found that this worked for me - setting SameSite as "None" - and some more info on what that means here.

    Apparently, browsers no longer allow you to set whatever you want in an iframe, I was trying to handle a session in an iframe, loaded on a different domain and while doing that, I noticed that a different session was being created for the OTHER domain instead of what I was loading in the iframe. This seems to have fixed it. I am still testing but it's the first thing that worked since I started looking for a fix this morning.

提交回复
热议问题