Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Request headers (and cookies sent) missing in Chrome Network Inspector?

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.

like image 727
fbparis Avatar asked Aug 19 '12 02:08

fbparis


People also ask

Why are cookies missing in the post cross-site request?

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.

How to fix SameSite cookies not working on Chrome?

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.

How to troubleshoot cookies not matching domain?

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.

Why is my Cookie not being stored in the browser?

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:


1 Answers

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.

like image 96
Luc Avatar answered Sep 21 '22 21:09

Luc