Hey, i’ve an issue when setting the cookies apart from localhost in gin gonic
c.SetCookie("token", str, 60*60*24, "https://discussion board.golangbridge.org/", "localhost:3000", true, true) // WORKS
c.SetCookie("token", str, 60*60*24, "https://discussion board.golangbridge.org/", "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{"Settle for", "Authorization", "Content material-Sort", "Content material-Size", "X-CSRF-Token", "Token", "session", "Origin", "Host", "Connection", "Settle for-Encoding", "Settle for-Language", "X-Requested-With"},
ExposeHeaders: []string{"Content material-Size"},
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 web page.