I'm trying to send some cookies up with a request from some Go code I'm writing, and it seemingly does not work with localhost cookies. Is there an option or something that needs to be done to make this work?
The cookie itself is present, when I print out the cookie jar just before the request, I can see the following contents:
"Cookie Jar"="&{psList:<nil> mu:{state:0 sema:0} entries:map[localhost:map[localhost;/;{COOKIE_NAME}:{Name:{COOKIE_NAME} Value:{COOKIE_VALUE} Quoted:false Domain:localhost Path:/ SameSite:SameSite=Lax Secure:true HttpOnly:true Persistent:true HostOnly:true Expires:{wall:13961957429007098536 ext:43201850773835 loc:0x105fa4e80} Creation:{wall:13961911043360301736 ext:1850773835 loc:0x105fa4e80} LastAccess:{wall:13961911043360301736 ext:1850773835 loc:0x105fa4e80} seqNum:0}]] nextSeqNum:1}"
req.URL is http://localhost:8080/api/v1/account
and client.Jar.Cookies(req.URL) returns an empty array. All of this info is the state of the client directly before calling client.Do(req), so from my understanding, while the cookie is present, because client.Jar.Cookies(req.URL) is returning an empty array, no cookies are being inserted.
My question is why can it not find the localhost cookie for a localhost URL?
localhost).