Hello, i have a problem when setting the cookies other than localhost in gin gonic
c.SetCookie("token", str, 60*60*24, "/", "localhost:3000", true, true) // WORKS
c.SetCookie("token", str, 60*60*24, "/", "192.162.1.12:3000", true, true) // DOSNT WORK
my headers are like this
router.Use(cors.New(cors.Config{
AllowOrigins: []string{"http://localhost:3000", "http://192.168.1.10:3000"},
AllowMethods: []string{"POST", "OPTIONS", "GET", "PUT", "DELETE"},
AllowHeaders: []string{"Accept", "Authorization", "Content-Type", "Content-Length", "X-CSRF-Token", "Token", "session", "Origin", "Host", "Connection", "Accept-Encoding", "Accept-Language", "X-Requested-With"},
ExposeHeaders: []string{"Content-Length"},
AllowCredentials: true,
// AllowOriginFunc: func(origin string) bool {
// return origin == "https://github.com"
// },
MaxAge: 24 * time.Hour,
}))
Im calling the api from my localhost “http://192.162.1.12:3000” react page.