moonming commented on a change in pull request #5378:
URL: https://github.com/apache/apisix/pull/5378#discussion_r740875207
##########
File path: docs/en/latest/plugins/limit-count.md
##########
@@ -39,7 +39,8 @@ Limit request rate by a fixed number of requests in a given
time window.
| ------------------- | ------- | --------------------------------------- |
------------- |
-------------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| count | integer | required |
| count > 0
| the specified number of requests
threshold.
|
| time_window | integer | required |
| time_window > 0
| the time window in seconds before the request count
is reset.
|
-| key | string | optional |
"remote_addr" | ["remote_addr", "server_addr", "http_x_real_ip",
"http_x_forwarded_for", "consumer_name", "service_id"] | The user specified key
to limit the count. <br /> Now accept those as key: "remote_addr"(client's IP),
"server_addr"(server's IP), "X-Forwarded-For/X-Real-IP" in request header,
"consumer_name"(consumer's username) and "service_id".
|
+| key_type | string | optional | "var" | ["var",
"var_combination"] | the type of key. |
+| key | string | optional | "remote_addr" | | the user
specified key to limit the rate. If the `key_type` is "var", the key will be
treated as a name of variable, like "remote_addr" or "consumer_name". If the
`key_type` is "var_combination", the key will be a combination of variables,
like "$remote_addr $consumer_name". |
Review comment:
we need more examples for `var_combination`, so that developers know how
to use
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]