feat: add http rate limiting
This commit is contained in:
@@ -38,6 +38,13 @@ Port = 8080 # HTTP 监听端口
|
||||
# AllowMethods = "GET,POST,PUT,DELETE"
|
||||
# ExposeHeaders = "X-Request-Id"
|
||||
# AllowCredentials = true
|
||||
|
||||
[Http.RateLimit]
|
||||
# Enabled = true
|
||||
# Max = 120 # 每窗口最大请求数
|
||||
# WindowSeconds = 60 # 窗口大小(秒)
|
||||
# Message = "Too Many Requests"
|
||||
# SkipPaths = ["/healthz", "/readyz"]
|
||||
# =========================
|
||||
# Connection Multiplexer (providers/cmux)
|
||||
# 用于同端口同时暴露 HTTP + gRPC:cmux -> 分发到 Http/Grpc
|
||||
|
||||
Reference in New Issue
Block a user