正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
@@ -20,7 +20,8 @@ func AllowCors() func(ctx *context.Context) { | @@ -20,7 +20,8 @@ func AllowCors() func(ctx *context.Context) { | ||
20 | AllowMethods: []string{"*"}, | 20 | AllowMethods: []string{"*"}, |
21 | //指的是允许的Header的种类 | 21 | //指的是允许的Header的种类 |
22 | //AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Content-Type", "x-requested-with"}, | 22 | //AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Content-Type", "x-requested-with"}, |
23 | - AllowHeaders: []string{"*"}, | 23 | + //AllowHeaders: []string{"*"}, |
24 | + AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Content-Type", "X-MMM-DeviceType", "X-MMM-Version", "X-MMM-Timestamp", "X-MMM-Sign", "X-MMM-Uuid", "X-MMM-AccessToken", "X-MMM-AppName", "X-MMM-AppProject"}, | ||
24 | //公开的HTTP标头列表 | 25 | //公开的HTTP标头列表 |
25 | ExposeHeaders: []string{"Content-Length"}, | 26 | ExposeHeaders: []string{"Content-Length"}, |
26 | //如果设置,则允许共享身份验证凭据,例如cookie | 27 | //如果设置,则允许共享身份验证凭据,例如cookie |
-
请 注册 或 登录 后发表评论