v2.5.2
Giriş yap

Ajax İle Sayfa Yüklendiğinde Cookie Hatası Alıyorum

ferdi
888 defa görüntülendi

Merhaba arkadaşlar, ajax ile sayfayı yenilemeden içeriği çekebiliyorum ancak şöyle bir sorunum var. Yazı içerisinde github, youtube, twitter gibi embed'lar varsa aşağıdaki hatayı alıyorum.

A cookie associated with a cross-site resource at https://gist.github.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.

Sanıyorum chrome ile gelmiş bir şey bu. PHP için bir kaç kod denedim ancak çalıştıramadım. Bu sorunu nasıl aşabilirim bilgisi olan var mı?

Cevap yaz
Cevaplar (1)
mrknowitall
1606 gün önce

Session id oluştur ve Javascript in sessionStorage ile oluşturduğun session id sini depola ve ajax ile request yaptığında o session id sini de herseferinde gönder.

Daha fazla bilgi için

https://stackoverflow.com/questions/14462423/cross-domain-post-request-is-not-sending-cookie-ajax-jquery