修复格式问题,重构嵌套层数过深的函数

This commit is contained in:
Leonard Wang
2020-05-19 23:37:55 +08:00
parent 5e2687a742
commit b09e54c205
38 changed files with 168 additions and 173 deletions

View File

@@ -15,7 +15,7 @@ func Cors() gin.HandlerFunc {
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")
//放行所有OPTIONS方法
// 放行所有OPTIONS方法
if method == "OPTIONS" {
c.AbortWithStatus(http.StatusNoContent)
}