...
|
...
|
@@ -15,7 +15,7 @@ func AllowCors() func(ctx *context.Context) { |
|
|
//指的是允许的Header的种类
|
|
|
AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Content-Type", "x-requested-with"},
|
|
|
//公开的HTTP标头列表
|
|
|
ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
|
|
|
ExposeHeaders: []string{"Content-Length"},
|
|
|
//如果设置,则允许共享身份验证凭据,例如cookie
|
|
|
AllowCredentials: true,
|
|
|
})
|
...
|
...
|
|