CAGeng

Results 1 comments of CAGeng
trafficstars

求讲跨域中间件,我是这样写的,但是失败了: ``` =========================cors.go==================================== import "fmt" func CORSMiddleware() HandlerFunc { return func(c *Context) { fmt.Print("1") c.Writer.Header().Set("Access-Control-Allow-Origin", "*") c.Writer.Header().Set("Access-Control-Allow-Credentials", "true") c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With") c.Writer.Header().Set("Access-Control-Allow-Methods", "POST,...