From 57f3f5c38d493a721d2199484840627b45e866da Mon Sep 17 00:00:00 2001 From: NewName Date: Sat, 17 May 2025 16:54:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=99=90=E5=88=B6=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ghproxy/ratelimiter.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghproxy/ratelimiter.go b/ghproxy/ratelimiter.go index 287f336..df1b58d 100644 --- a/ghproxy/ratelimiter.go +++ b/ghproxy/ratelimiter.go @@ -256,7 +256,7 @@ func RateLimitMiddleware(limiter *IPRateLimiter) gin.HandlerFunc { // 如果IP在黑名单中 if !allowed { c.JSON(403, gin.H{ - "error": "您的IP已被限制访问", + "error": "您已被限制访问", }) c.Abort() return @@ -265,7 +265,7 @@ func RateLimitMiddleware(limiter *IPRateLimiter) gin.HandlerFunc { // 检查是否允许本次请求 if !ipLimiter.Allow() { c.JSON(429, gin.H{ - "error": "请求频率过高,触发IP限流", + "error": "请求频率过快,暂时限制访问", }) c.Abort() return @@ -294,4 +294,4 @@ func ApplyRateLimit(router *gin.Engine, path string, method string, handler gin. default: router.Any(path, RateLimitMiddleware(limiter), handler) } -} \ No newline at end of file +}