This commit is contained in:
2025-11-22 15:43:24 +08:00
parent 7fc072e608
commit 8d0f1e6aa3
3 changed files with 83 additions and 3 deletions

View File

@@ -117,9 +117,11 @@ type JWTConfig struct {
// RateLimitConfig 限流配置
type RateLimitConfig struct {
Requests int `mapstructure:"requests"`
Window time.Duration `mapstructure:"window"`
Burst int `mapstructure:"burst"`
Requests int `mapstructure:"requests"`
Window time.Duration `mapstructure:"window"`
Burst int `mapstructure:"burst"`
ExcludePaths []string `mapstructure:"exclude_paths"` // 排除频率限制的路径
ExcludeDomains []string `mapstructure:"exclude_domains"` // 排除频率限制的域名
}
// DailyRateLimitConfig 每日限流配置