This commit is contained in:
aozhiwei 2024-04-09 10:38:27 +08:00
parent 50d52ef7f6
commit 57afd57463

View File

@ -17,7 +17,7 @@ func Cors() gin.HandlerFunc {
c.Header("Access-Control-Allow-Credentials", "true") c.Header("Access-Control-Allow-Credentials", "true")
//} //}
if method == "OPTIONS" { if method == "OPTIONS" {
c.AbortWithStatus(http.StatusNoContent) c.AbortWithStatus(http.StatusOK)
} }
c.Next() c.Next()
} }