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



##########
File path: doc/zh-cn/plugins/limit-req.md
##########
@@ -19,26 +19,34 @@
 
 - [English](../../plugins/limit-req.md)
 
-# limit-req
+# 目录
+  - [简介](#简介)
+  - [属性](#属性)
+  - [示例](#示例)
+    - [如何在 `route` 或 `service` 上使用](#如何在`route`或`service`上使用)
+    - [如何在 `consumer` 上使用](#如何在`consumer`上使用)
+  - [移除插件](#移除插件)
+
+## 简介
 
 限制请求速度的插件,使用的是漏桶算法。
 
-## 参数
+## 属性
 
 | 名称          | 类型    | 必选项 | 默认值 | 有效值                                        
                           | 描述                                                 
                                                                                
             |
 | ------------- | ------- | ------ | ------ | 
------------------------------------------------------------------------ | 
-------------------------------------------------------------------------------------------------------------------------------------------------
 |
-| rate          | integer | 必须   |        | [0,...]                            
                                      | 指定的请求速率(以秒为单位),请求速率超过 `rate` 但没有超过 
(`rate` + `brust`)的请求会被加上延时。                                             |
-| burst         | integer | 必须   |        | [0,...]                            
                                      | t请求速率超过 (`rate` + `brust`)的请求会被直接拒绝。    
                                                                                
        |
-| key           | string  | 必须   |        | ["remote_addr", "server_addr", 
"http_x_real_ip", "http_x_forwarded_for"] | 用来做请求计数的依据,当前接受的 key 
有:"remote_addr"(客户端IP地址), "server_addr"(服务端 IP 地址), 请求头中的"X-Forwarded-For" 或 
"X-Real-IP"。 |
-| rejected_code | string  | 可选   | 503    | [200,...]                          
                                      | 当请求超过阈值被拒绝时,返回的 HTTP 状态码                
                                                                                
        |
+| rate          | number | 必须   |        | [0,...]                             
                                     | 指定的请求速率(以秒为单位),请求速率超过 `rate` 但没有超过 
(`rate` + `brust`)的请求会被加上延时。                                             |
+| burst         | number | 必须   |        | [0,...]                             
                                     | t请求速率超过 (`rate` + `brust`)的请求会被直接拒绝。     
                                                                                
       |
+| key           | string  | 必须   |        | ["remote_addr", "server_addr", 
"http_x_real_ip", "http_x_forwarded_for", "consumer_name"] | 用来做请求计数的依据,当前接受的 
key 有:"remote_addr"(客户端IP地址), "server_addr"(服务端 IP 地址), 请求头中的"X-Forwarded-For" 
或 "X-Real-IP","consumer_name"(consumer 的 username)。 |
+| rejected_code | integer  | 可选   | 503    | [200,...]                         
                                       | 当请求超过阈值被拒绝时,返回的 HTTP 状态码。              
                                                                                
          |
 
 **key 是可以被用户自定义的,只需要修改插件的一行代码即可完成。并没有在插件中放开是处于安全的考虑。**
 
 ## 示例
 
-### 开启插件
+### 如何在`route`或`service`上使用
 
-下面是一个示例,在指定的 route 上开启了 limit req 插件:
+这里以`route`为例(`service`的使用是同样的方法),在指定的路线上启用limit req插件。

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