Skip to content

Commit

Permalink
feat: limit-req support nodelay (apache#4382)
Browse files Browse the repository at this point in the history
  • Loading branch information
jianzhou committed Jun 10, 2021
1 parent 3664a7e commit 2eaba1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/limit-req.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ title: limit-req
| burst | integer | 必须 | | burst >= 0 | t请求速率超过 (`rate` + `brust`)的请求会被直接拒绝。 |
| 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 状态码。 |
| nodelay | boolean | 可选 | false | | 如果nodelay为false, 则满足条件的请求不会加上延迟 |
| nodelay | boolean | 可选 | false | | 如果nodelay为false, 请求速率超过 `rate` 但没有超过 (`rate` + `brust`)的请求不会加上延迟 |

**key 是可以被用户自定义的,只需要修改插件的一行代码即可完成。并没有在插件中放开是处于安全的考虑。**

Expand Down

0 comments on commit 2eaba1c

Please sign in to comment.