正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
@@ -67,7 +67,7 @@ func AllowCors() func(ctx *context.Context) { | @@ -67,7 +67,7 @@ func AllowCors() func(ctx *context.Context) { | ||
67 | ctx.Output.Header("Access-Control-Allow-Methods", "OPTIONS,DELETE,POST,GET,PUT,PATCH") | 67 | ctx.Output.Header("Access-Control-Allow-Methods", "OPTIONS,DELETE,POST,GET,PUT,PATCH") |
68 | //ctx.Output.Header("Access-Control-Max-Age", "3600") | 68 | //ctx.Output.Header("Access-Control-Max-Age", "3600") |
69 | //ctx.Output.Header("Access-Control-Allow-Headers", "*,x-mmm-version") | 69 | //ctx.Output.Header("Access-Control-Allow-Headers", "*,x-mmm-version") |
70 | - ctx.Output.Header("Access-Control-Allow-Headers", "Content-Type,X-Mmm-Accesstoken,X-Mmm-Devicetype,X-Mmm-Sign,X-Mmm-Timestamp,X-Mmm-Uuid,X-Mmm-Version") | 70 | + ctx.Output.Header("Access-Control-Allow-Headers", "Content-Type,X-Mmm-Accesstoken,X-Mmm-Devicetype,X-Mmm-Sign,X-Mmm-Timestamp,X-Mmm-Uuid,X-Mmm-Version,x-mmm-appname,*") |
71 | ctx.Output.Header("Access-Control-Allow-Credentials", "true") | 71 | ctx.Output.Header("Access-Control-Allow-Credentials", "true") |
72 | ctx.Output.Header("Access-Control-Allow-Origin", "*") //origin | 72 | ctx.Output.Header("Access-Control-Allow-Origin", "*") //origin |
73 | if ctx.Input.Method() == http.MethodOptions { | 73 | if ctx.Input.Method() == http.MethodOptions { |
-
请 注册 或 登录 后发表评论