You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/06/02 01:21:18 UTC
[incubator-apisix] branch master updated: doc(limit-count): fixed
document description does not match source code. (#1628)
This is an automated email from the ASF dual-hosted git repository.
membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 887e812 doc(limit-count): fixed document description does not match source code. (#1628)
887e812 is described below
commit 887e812b207f478c0215442d1160925bc2880b86
Author: xxm404 <46...@users.noreply.github.com>
AuthorDate: Tue Jun 2 09:21:10 2020 +0800
doc(limit-count): fixed document description does not match source code. (#1628)
close #1627
---
doc/plugins/limit-count-cn.md | 2 +-
doc/plugins/limit-count.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/plugins/limit-count-cn.md b/doc/plugins/limit-count-cn.md
index 1768ebc..6f74256 100644
--- a/doc/plugins/limit-count-cn.md
+++ b/doc/plugins/limit-count-cn.md
@@ -31,7 +31,7 @@
|count |必选 |指定时间窗口内的请求数量阈值|
|time_window |必选 |时间窗口的大小(以秒为单位),超过这个时间就会重置|
|key |必选 |是用来做请求计数的依据,当前接受的 key 有: "remote_addr", "server_addr", "http_x_real_ip", "http_x_forwarded_for"。|
-|rejected_code |可选 |T当请求超过阈值被拒绝时,返回的 HTTP 状态码,默认是 503|
+|rejected_code |必选 |T当请求超过阈值被拒绝时,返回的 HTTP 状态码。|
|policy |可选 |用于检索和增加限制的速率限制策略。可选的值有:`local`(计数器被以内存方式保存在节点本地,默认选项) 和 `redis`(计数器保存在 Redis 服务节点上,从而可以跨节点共享结果,通常用它来完成全局限速).|
|redis_host |可选 |当使用 `redis` 限速策略时,该属性是 Redis 服务节点的地址。|
|redis_port |可选 |当使用 `redis` 限速策略时,该属性是 Redis 服务节点的端口,默认端口 6379。|
diff --git a/doc/plugins/limit-count.md b/doc/plugins/limit-count.md
index 44eca68..51fb6de 100644
--- a/doc/plugins/limit-count.md
+++ b/doc/plugins/limit-count.md
@@ -38,7 +38,7 @@ Limit request rate by a fixed number of requests in a given time window.
|count |required|the specified number of requests threshold.|
|time_window |required|the time window in seconds before the request count is reset.|
|key |required|the user specified key to limit the rate. Here is fully key list: "remote_addr", "server_addr", "http_x_real_ip", "http_x_forwarded_for".|
-|rejected_code |optional|The HTTP status code returned when the request exceeds the threshold is rejected. The default is 503.|
+|rejected_code |required|The HTTP status code returned when the request exceeds the threshold is rejected.|
|policy |optional|The rate-limiting policies to use for retrieving and incrementing the limits. Available values are `local`(the counters will be stored locally in-memory on the node, default value) and `redis`(counters are stored on a Redis server and will be shared across the nodes, usually used it to do the global speed limit).|
|redis_host |optional|When using the `redis` policy, this property specifies the address of the Redis server.|
|redis_port |optional|When using the `redis` policy, this property specifies the port of the Redis server. The default port is 6379.|