作者 陈志颖

fix:跨域允许所有Header

... ... @@ -19,7 +19,8 @@ func AllowCors() func(ctx *context.Context) {
//其中Options跨域复杂请求预检
AllowMethods: []string{"*"},
//指的是允许的Header的种类
AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Content-Type", "x-requested-with", "x-tl-sign"},
//AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Content-Type", "x-requested-with"},
AllowHeaders: []string{"*"},
//公开的HTTP标头列表
ExposeHeaders: []string{"Content-Length"},
//如果设置,则允许共享身份验证凭据,例如cookie
... ...