Jaycean commented on a change in pull request #2421:
URL: https://github.com/apache/apisix/pull/2421#discussion_r506056985
##########
File path: doc/zh-cn/plugins/limit-count.md
##########
@@ -30,7 +30,9 @@
| -------------- | ------- | ------------ | ------- |
------------------------------------------------------------------------ |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| count | integer | 必须 | | [0,...]
| 指定时间窗口内的请求数量阈值
|
| time_window | integer | 必须 | | [0,...]
| 时间窗口的大小(以秒为单位),超过这个时间就会重置
|
-| key | string | 必须 | | ["remote_addr",
"server_addr", "http_x_real_ip", "http_x_forwarded_for"] | 用来做请求计数的依据
|
+| key | string | 必须 | | ["remote_addr",
"server_addr", "http_x_real_ip", "http_x_forwarded_for", "consumer_name"] |
用户指定的限制请求次数的关键字,可以是客户端IP、服务端IP,请求头中的"X-Forwarded-For" 或
"X-Real-IP",以及"consumer_name"。
+例如,可以使用主机名(或服务器区域)作为关键字,以便限制每个主机名规定时间内的请求次数。我们也可以使用客户端地址作为关键字,这样我们就可以避免单个客户端规定时间内多次的连接我们的服务。
+当前接受的 key 有:"remote_addr"(客户端IP地址), "server_addr"(服务端 IP 地址),
请求头中的"X-Forwarded-For" 或 "X-Real-IP","consumer_name"(consumer 的 username)。
|
Review comment:
done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]