Firstsawyou commented on a change in pull request #2270: URL: https://github.com/apache/apisix/pull/2270#discussion_r494078429
########## File path: doc/plugins/limit-req.md ########## @@ -104,6 +106,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": "consumer_jack", + "plugins": { + "key-auth": { + "key": "auth-jack" + }, + "limit-req": { + "rate": 1, + "burst": 1, + "rejected_code": 403, + "key": "consumer_name" Review comment: No, the 'key' enumeration type has no default value. ---------------------------------------------------------------- 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]
