I am trying to set a cookie using go in the chrome browser but can only get it to set in postman.
The cookie successfully sets in postman but is simply not setting in chrome with no error. I have set CORS as default using this package https://github.com/gin-contrib/cors as I have had issues with CORS requests in the past and this seemed to solve the issue. I set the cookie using:
c.SetCookie(
"TOKEN",
tokenString,
3600,
"/",
"localhost",
false,
true)
I have tried replacing localhost with http://127.0.0.1 which again works in postman but not chrome or firefox. I have also tried setting the cookie with the http package instead but this has failed in the same way.
EDIT I have also tried domain as blank ("") but this has the same outcome.