This commit is contained in:
Mrx
2026-04-02 12:46:42 +08:00
parent 130f49fb9d
commit e9fe7ac303
3 changed files with 154 additions and 65 deletions

View File

@@ -113,6 +113,12 @@ func (m *DailyRateLimitMiddleware) Handle() gin.HandlerFunc {
c.Next()
return
}
// 开发环境debug模式下跳过
if m.config.Development.Debug {
m.logger.Info("开发环境debug模式下跳过每日限流", zap.String("path", c.Request.URL.Path))
c.Next()
return
}
// 检查是否在排除域名中
host := c.Request.Host