Home > Software engineering >  Chrome not saving cookies in localhost
Chrome not saving cookies in localhost

Time:05-08

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.

CodePudding user response:

Are you using HttpOnly cookies? If so, you need to ensure you have the withCredentials property set.

CodePudding user response:

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.

  • Related