提交 52852e6c 编写于 作者: Y yaooort

拦截

上级 b18059b4
......@@ -18,6 +18,7 @@ func IPLimit() gin.HandlerFunc {
expiration := time.Duration(second) * time.Second
if err := SetLimitWithTime(key, limit, expiration); err != nil {
response.FailWithMessage(err.Error(), c)
c.Abort()
return
}
// 继续往下处理
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册