From 16dbd3f9c90acbf1f08380b22f58863a11013fb7 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Tue, 17 Dec 2024 11:00:02 +0800 Subject: [PATCH] update --- app/mw/mw_limiter.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/mw/mw_limiter.go b/app/mw/mw_limiter.go index 71f7fc1..499e4c6 100644 --- a/app/mw/mw_limiter.go +++ b/app/mw/mw_limiter.go @@ -16,10 +16,10 @@ func Limiter(c *gin.Context) { limit := 500 // 限流次数 ttl := 2 // 限流过期时间 ip := utils.GetIP(c.Request) - //if ip != "221.4.210.167" { - // e.OutErr(c, e.ERR, "系统维护中~") - // return - //} + if ip != "221.4.210.167" { + e.OutErr(c, e.ERR, "系统维护中~") + return + } // 读取token或者ip token := c.GetHeader("Authorization") // 判断是否已经超出限额次数