feat(rate-limit): add default request rate limit configuration

- Support openresty_default_limit_req_per_ip in system_configs.
- Add limit_req and limit_req_status 429 directive generation in openresty renderer.
- Implement route-level limit_req_per_ip override and explicit disable.
- Add frontend UI inputs and validation in rate limits tab config.
- Update swagger API docs and changelog for v3.4.3-beta.3.
This commit is contained in:
ryan
2026-07-20 10:58:13 +08:00
parent fda8d7fcb1
commit ae5345c03e
18 changed files with 191 additions and 12 deletions
+6
View File
@@ -22,6 +22,12 @@ sidebar: false
## [unreleased]
## [v3.4.3-beta.3] - 2026-07-20
### 新增
- 安全性限流页「配置」页签新增请求频率限制配置:支持在全局配置单 IP 的请求频率限制(例如 10r/s、100r/m),触发限制时边缘节点返回 429 状态码;同时支持站点级别单独配置或通过 `-1` 显式禁用请求频率限制。
### 改进
- 限流页请求压力图的 RPS 纵轴按可见时间窗口最高值的 1.5 倍动态缩放,拖动底部时间范围条时同步更新。
+7 -1
View File
@@ -5571,7 +5571,7 @@ const docTemplate = `{
},
{
"type": "integer",
"description": "趋势桶分钟数(1、5 或 60,默认 60)",
"description": "趋势桶分钟数(1、3、5 或 60,默认 60)",
"name": "bucket_minutes",
"in": "query"
}
@@ -18272,6 +18272,9 @@ const docTemplate = `{
"limit_rate": {
"type": "string"
},
"limit_req_per_ip": {
"type": "string"
},
"origin_address": {
"type": "string"
},
@@ -18388,6 +18391,9 @@ const docTemplate = `{
"limit_rate": {
"type": "string"
},
"limit_req_per_ip": {
"type": "string"
},
"origin_host": {
"type": "string"
},
+7 -1
View File
@@ -5564,7 +5564,7 @@
},
{
"type": "integer",
"description": "趋势桶分钟数(1、5 或 60,默认 60)",
"description": "趋势桶分钟数(1、3、5 或 60,默认 60)",
"name": "bucket_minutes",
"in": "query"
}
@@ -18265,6 +18265,9 @@
"limit_rate": {
"type": "string"
},
"limit_req_per_ip": {
"type": "string"
},
"origin_address": {
"type": "string"
},
@@ -18381,6 +18384,9 @@
"limit_rate": {
"type": "string"
},
"limit_req_per_ip": {
"type": "string"
},
"origin_host": {
"type": "string"
},
+5 -1
View File
@@ -2928,6 +2928,8 @@ definitions:
type: integer
limit_rate:
type: string
limit_req_per_ip:
type: string
origin_address:
type: string
origin_host:
@@ -3005,6 +3007,8 @@ definitions:
type: integer
limit_rate:
type: string
limit_req_per_ip:
type: string
origin_host:
type: string
origin_id:
@@ -7522,7 +7526,7 @@ paths:
in: query
name: hours
type: integer
- description: 趋势桶分钟数(1、5 或 60,默认 60)
- description: 趋势桶分钟数(1、3、5 或 60,默认 60)
in: query
name: bucket_minutes
type: integer