Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome not saving cookies in localhost

I know this has been asked before but none of the solutions named work. I am using Spring boot and React for my webapp, and need to set cookies on the website. I am developing and testing using Google Chrome. When I get the response from the server, the cookie is present and visible. However it is not saved in Applications>Cookies.

What is the modern day solution of this? The recent past people asking have not gotten responses.

like image 268
siya Avatar asked Mar 21 '26 15:03

siya


1 Answers

Check if your cookies are set to save only when domain is secure. And when the cookie is saved, remember to use withCredentials option when sending requests. It would be also helpful if you posted your example response from the server, especially the headers.

like image 197
Iqaru Avatar answered Mar 23 '26 03:03

Iqaru



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!