正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
@@ -15,7 +15,7 @@ func AllowCors() func(ctx *context.Context) { | @@ -15,7 +15,7 @@ func AllowCors() func(ctx *context.Context) { | ||
15 | //指的是允许的Header的种类 | 15 | //指的是允许的Header的种类 |
16 | AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Content-Type", "x-requested-with"}, | 16 | AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Content-Type", "x-requested-with"}, |
17 | //公开的HTTP标头列表 | 17 | //公开的HTTP标头列表 |
18 | - ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"}, | 18 | + ExposeHeaders: []string{"Content-Length"}, |
19 | //如果设置,则允许共享身份验证凭据,例如cookie | 19 | //如果设置,则允许共享身份验证凭据,例如cookie |
20 | AllowCredentials: true, | 20 | AllowCredentials: true, |
21 | }) | 21 | }) |
-
请 注册 或 登录 后发表评论