Category "httpcookie"

Secure Cookies not working with hostname set in hosts file

I have cookies set as secure, but it's working as localhost. But with the domain name set in the hosts file, chrome is not sending the cookies to server resulte

SetCookie() couldn't set dot prefix for domain

package main import ( "time" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.GET("/ping", func(c *gin.Context) { c.Se