Spring boot & react - Cookies are not being set via browser, but are set on postman

Viewed 21

I am trying to set cookies, but they are not being set on the browser, but they do when I use postman to call the request.

Both sever & client run on HTTP. I can see the cookies being set in the response of the request in the network tab, but on application tab -> cookies localhost:3000 are not being set.

Thats how I set my cookies:

enter image description here

And that's how I call the request with react:

enter image description here

Why are the cookies not being set? Is there something wrong?

1 Answers

First guess is you are setting cookies to 127.0.0.1 and trying to read them on localhost.

Related