We intend to set cookie for *.1234tv.com in login.1234tv.com. However it does not work.
I have configure the container as below:
beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
AllowAllOrigins: true,
AllowOrigins: []string{"http://*.1234tv.com"},
AllowMethods: []string{"GET", "POST", "PUT", "DELETE","PATCH","HEAD", "OPTIONS"},
AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Content-Type"},
ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin"},
AllowCredentials: true,
}))
and set cookie in controller like this:
this.Ctx.SetCookie("UNION_TOKEN", utoken, 3600*24*7,"/", ".1234tv.com",false,false)