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