Commit 3c9e76fe by mushishixian

cors

parent f95c35e1
Showing with 1 additions and 1 deletions
......@@ -30,7 +30,7 @@ func Cors_Middleware() gin_.Middleware {
//c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token")
//c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS")
//c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type")
//c.Header("Access-Control-Allow-Credentials", "true")
c.Header("Access-Control-Allow-Credentials", "true")
//放行所有OPTIONS方法
if method == "OPTIONS" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment