diff --git a/src/modules/common/common.go b/src/modules/common/common.go index ffdec896..d5d53eb5 100644 --- a/src/modules/common/common.go +++ b/src/modules/common/common.go @@ -15,11 +15,11 @@ func Setup(router *gin.Engine) { // 路由主页 indexGroup := router.Group("/") indexGroup.GET("", - middleware.RateLimit(middleware.LimitOption{ - Time: 300, - Count: 10, - Type: middleware.LIMIT_IP, - }), + // middleware.RateLimit(middleware.LimitOption{ + // Time: 300, + // Count: 10, + // Type: middleware.LIMIT_IP, + // }), controller.NewIndex.Handler, ) @@ -28,32 +28,32 @@ func Setup(router *gin.Engine) { // 验证码操作处理 indexGroup.GET("/captchaImage", - middleware.RateLimit(middleware.LimitOption{ - Time: 300, - Count: 60, - Type: middleware.LIMIT_IP, - }), + // middleware.RateLimit(middleware.LimitOption{ + // Time: 300, + // Count: 60, + // Type: middleware.LIMIT_IP, + // }), controller.NewCaptcha.Image, ) // 账号身份操作处理 { indexGroup.POST("/login", - middleware.RateLimit(middleware.LimitOption{ - Time: 300, - Count: 10, - Type: middleware.LIMIT_IP, - }), + // middleware.RateLimit(middleware.LimitOption{ + // Time: 300, + // Count: 10, + // Type: middleware.LIMIT_IP, + // }), controller.NewAccount.Login, ) indexGroup.GET("/getInfo", middleware.PreAuthorize(nil), controller.NewAccount.Info) indexGroup.GET("/getRouters", middleware.PreAuthorize(nil), controller.NewAccount.Router) indexGroup.POST("/logout", - middleware.RateLimit(middleware.LimitOption{ - Time: 300, - Count: 5, - Type: middleware.LIMIT_IP, - }), + // middleware.RateLimit(middleware.LimitOption{ + // Time: 300, + // Count: 5, + // Type: middleware.LIMIT_IP, + // }), controller.NewAccount.Logout, ) } @@ -61,11 +61,11 @@ func Setup(router *gin.Engine) { // 账号注册操作处理 { indexGroup.POST("/register", - middleware.RateLimit(middleware.LimitOption{ - Time: 300, - Count: 10, - Type: middleware.LIMIT_IP, - }), + // middleware.RateLimit(middleware.LimitOption{ + // Time: 300, + // Count: 10, + // Type: middleware.LIMIT_IP, + // }), controller.NewRegister.Register, ) }