feat: support redis rate limiting

This commit is contained in:
2026-01-17 12:04:55 +08:00
parent c399a65d83
commit 419877ffa8
4 changed files with 134 additions and 0 deletions

View File

@@ -45,6 +45,13 @@ Port = 8080 # HTTP 监听端口
# WindowSeconds = 60 # 窗口大小(秒)
# Message = "Too Many Requests"
# SkipPaths = ["/healthz", "/readyz"]
#
# [Http.RateLimit.Redis]
# Addrs = ["127.0.0.1:6379"]
# Username = ""
# Password = ""
# DB = 0
# Prefix = "rl:"
# =========================
# Connection Multiplexer (providers/cmux)
# 用于同端口同时暴露 HTTP + gRPCcmux -> 分发到 Http/Grpc