I've noticed that request headers and cookies sent have disappear from network inspection in some cases (XHR request for example), at least with OSX Google Chrome.
If you don't see what I mean, just open the web inspector and connect to your Twitter account, then check the XHR requests: you can see request payload and response headers but headers and cookies sent have disappear.
Any idea how to fix this ? I've tried activating some exotic flags in about:flags but saw no changes.
If the server doesn’t allow credentials being sent along, the browser will just not attach cookies and authorization headers. So this could be another reason why the cookies are missing in the POST cross-site request. Troubleshooting tip: open the developer console and check in the Network tab what are the response headers from OPTIONS.
Troubleshooting tip: In Chrome type in the URL chrome://flags and disable these two flags: SameSite by default cookies and Cookies without SameSite must be secure. If this helped, you now know the issue and you can apply the fix. Solution tip: Modify the server code to explicitly set the cookie’s SameSite attribute to None.
Troubleshooting tip: open the developer console, navigate to Application>Cookies and edit the path attribute directly in there to see if this helps Solution tip : Fix the code to set the cookies with matching Path. 5. Domain is not Matching The key aspect of the browser security is that a cookie is only sent over to the host for which it was set.
If the cookie’s attribute SameSite is None the cookie has to be set with flag Secure. If the cookie doesn’t have the Secure flag, the browser ignores the Set-cookie server’s response header and the cookie is not stored to the browser. If you got this wrong, you probably see in the the developer console following error message:
It seems to be because the requested page is loaded over https. I don't know why Chrome suddenly finds it necessary to hide the request headers, but testing, a secure connection seems to be the trigger for this behavior.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With