beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
AllowOrigins: []string{"http://localhost:9090"},
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH"},
AllowHeaders: []string{"Origin", "Auth-Token"},
ExposeHeaders: []string{"Content-Length"},
AllowCredentials: true}))
原文:http://blog.51cto.com/iceyao/2128989