Skip to content
Advertisement

Why Cookies are not set in the browser but works in Postman?

Backend is Spring boots. I setup cookie there and it is working fine with postman.

JavaScript

Front End is ReactJS, I’ve used a POST method using Axios to get Login information. I am getting response, but cookies are not set.

JavaScript

Tried many things. No Luck

Advertisement

Answer

Got a fix finally.

JavaScript

WithCredentials should be passed like this from front-end. in Backend code, along with the Crossorigin management, we need to add allowCredentials to true

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement