The adhering to is my code for establishing a cookie with the builtin net/http. It sends out the cookie simply great however does not send out any one of the features in addition to it. I go to a loss for why.
// give token as cookie to frontend.
ck:= && http.Cookie {
Call: "token",.
Worth: "examination",.
Course: "https://forum.golangbridge.org/",.
MaxAge: int( time.Now(). Include( time.Minute * 60). Unix()),.
HttpOnly: real,.
Secure: real,.
SameSite: http.SameSiteLaxMode,.
}
http.SetCookie( w, ck).
The header returned appear like such.
Set-Cookie: token=<< legitimate token>>.
I’m anticipating something a lot more such as this:
Set-Cookie: token=<< legitimate token>>; Course=/; Max-Age= 3600; HttpOnly; Secure; SameSite= Lax.