zqbao 10 сар өмнө
parent
commit
b73f8b6acc

+ 1 - 1
controllers/base_auth.go

@@ -121,7 +121,7 @@ func (c *BaseAuthController) Prepare() {
 			for _, s := range apis {
 				apiMap[s] = true
 			}
-			if !apiMap[uri] || utils.NoAuthApiMap[uri] {
+			if !apiMap[uri] && !utils.NoAuthApiMap[uri] {
 				c.JSON(models.BaseResponse{Ret: 403, Msg: "无权访问!", ErrMsg: "无权访问!"}, false, false)
 				c.StopRun()
 				return