Firstsawyou commented on a change in pull request #2270: URL: https://github.com/apache/apisix/pull/2270#discussion_r492527870
########## File path: doc/zh-cn/plugins/limit-req.md ########## @@ -98,6 +98,78 @@ Server: APISIX web server 这就表示 limit req 插件生效了。 +### 如何在`consumer`上启用插件 + +consumer上开启`limit-req`插件,需要与授权插件一起配合使用,这里以key-auth授权插件为例。 + +1、将`limit-req`插件绑定到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", + "plugins": { + "key-auth": { + "key": "auth-jack" + }, + "limit-req": { + "rate": 1, + "burst": 1, + "rejected_code": 403, + "key": "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]
