Firstsawyou commented on a change in pull request #2270:
URL: https://github.com/apache/apisix/pull/2270#discussion_r492912016



##########
File path: doc/plugins/limit-req.md
##########
@@ -37,7 +40,7 @@ limit request rate using the "leaky bucket" method.
 |---------     |--------|-----------|
 |rate          |required|is the specified request rate (number per second) 
threshold. Requests exceeding this rate (and below `burst`) will get delayed to 
conform to the rate.|
 |burst         |required|is the number of excessive requests per second 
allowed to be delayed. Requests exceeding this hard limit will get rejected 
immediately.|
-| key          |required|is the user specified key to limit the rate, now 
accept those as key: "remote_addr"(client's IP), "server_addr"(server's IP), 
"X-Forwarded-For/X-Real-IP" in request header.|
+| key          |required|is the user specified key to limit the rate, now 
accept those as key: "remote_addr"(client's IP), "server_addr"(server's IP), 
"X-Forwarded-For", "X-Real-IP/consumer_name(consumer's ID)" in request header.|

Review comment:
       fixed.

##########
File path: doc/plugins/limit-req.md
##########
@@ -104,6 +107,78 @@ Server: APISIX web server
 
 This means that the limit req plugin is in effect.
 
+## How to enable on the `consumer`
+
+To enable the `limit-req` plugin on the consumer, it needs to be used together 
with the authorization plugin. Here, the key-auth authorization plugin is taken 
as an example.
+
+1. Bind the `limit-req` plugin to the consumer
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "username": "limit_req_consumer_name",

Review comment:
       fixed.




----------------------------------------------------------------
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]


Reply via email to