This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 593f00f docs: update limit-req.md (#5461)
593f00f is described below
commit 593f00ff57b0bb5ff124aa974927004c5e7195e6
Author: Xu_Mj <[email protected]>
AuthorDate: Thu Nov 11 08:54:06 2021 +0800
docs: update limit-req.md (#5461)
---
docs/zh/latest/plugins/limit-req.md | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/docs/zh/latest/plugins/limit-req.md
b/docs/zh/latest/plugins/limit-req.md
index a7d88ca..58ffaac 100644
--- a/docs/zh/latest/plugins/limit-req.md
+++ b/docs/zh/latest/plugins/limit-req.md
@@ -38,13 +38,12 @@ title: limit-req
| 名称 | 类型 | 必选项 | 默认值 | 有效值
| 描述
|
| ------------- | ------- | ------ | ------ |
------------------------------------------------------------------------ |
-------------------------------------------------------------------------------------------------------------------------------------------------
|
-| rate | integer | 必须 | | rate > 0
| 指定的请求速率(以秒为单位),请求速率超过 `rate` 但没有超过
(`rate` + `brust`)的请求会被加上延时。 |
-| burst | integer | 必须 | | burst >= 0
| 请求速率超过 (`rate` + `brust`)的请求会被直接拒绝。
|
-| key_type | string | 可选 | "var" | ["var", "var_combination"]
| key 的类型 |
-| key | string | 必须 | | | 用来做请求计数的依据。如果 `key_type` 为
"var",那么 key 会被当作变量名称,如 "remote_addr" 和 "consumer_name"。如果 `key_type` 为
"var_combination",那么 key 会当作变量组合,如 "$remote_addr $consumer_name"。如果 key
的值为空,$remote_addr 会被作为默认 key。 |
+| rate | integer | 必须 | | rate > 0
| 指定的请求速率(以秒为单位),请求速率超过 `rate` 但没有超过
(`rate` + `burst`)的请求会被加上延时。 |
+| burst | integer | 必须 | | burst >= 0
| t请求速率超过 (`rate` + `burst`)的请求会被直接拒绝。
|
+| key | string | 必须 | | ["remote_addr", "server_addr",
"http_x_real_ip", "http_x_forwarded_for", "consumer_name"] | 用来做请求计数的依据,当前接受的
key 有:"remote_addr"(客户端IP地址), "server_addr"(服务端 IP 地址), 请求头中的"X-Forwarded-For"
或 "X-Real-IP","consumer_name"(consumer 的 username)。 |
| rejected_code | integer | 可选 | 503 | [200,...,599]
| 当请求超过阈值被拒绝时,返回的 HTTP 状态码。
|
| rejected_msg | string | 可选 |
| 非空 | 当请求超过阈值被拒绝时,返回的响应体。
|
-| nodelay | boolean | 可选 | false |
| 如果 nodelay 为 true, 请求速率超过 `rate` 但没有超过
(`rate` + `brust`)的请求不会加上延迟, 如果是 false,则会加上延迟。 |
+| nodelay | boolean | 可选 | false |
| 如果 nodelay 为 true, 请求速率超过 `rate` 但没有超过
(`rate` + `burst`)的请求不会加上延迟, 如果是 false,则会加上延迟。 |
| allow_degradation | boolean | 可选
| false |
| 当限速插件功能临时不可用时是否允许请求继续。当值设置为 true 时则自动允许请求继续,默认值是 false。|
## 示例