You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/08/06 06:14:20 UTC

[GitHub] [apisix] lunarwhite opened a new pull request, #7620: docs: refactor client-control

lunarwhite opened a new pull request, #7620:
URL: https://github.com/apache/apisix/pull/7620

   ### Description
   
   update document under `docs/zh/latest/plugins/`
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7620: docs: refactor client-control

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7620:
URL: https://github.com/apache/apisix/pull/7620#discussion_r939762665


##########
docs/zh/latest/plugins/client-control.md:
##########
@@ -25,17 +30,21 @@ title: client-control
 
 `client-control` 插件能够动态地控制 Nginx 处理客户端的请求的行为。

Review Comment:
   ```suggestion
   `client-control` 插件能够动态地控制 NGINX 处理客户端的请求行为。
   ```



##########
docs/en/latest/plugins/client-control.md:
##########
@@ -2,10 +2,9 @@
 title: client-control
 keywords:
   - APISIX
-  - Plugin
+  - API Gateway
   - Client Control
-  - client-control
-description: This document contains information about the Apache APISIX client-control Plugin.
+description: This document contains information about the Apache APISIX client-control Plugin, you can use it to  control the behavior of Nginx to handle a client request dynamically.

Review Comment:
   ```suggestion
   description: This document describes the Apache APISIX client-control Plugin, you can use it to control NGINX behavior to handle a client request dynamically.
   ```



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on a diff in pull request #7620: docs: refactor client-control

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #7620:
URL: https://github.com/apache/apisix/pull/7620#discussion_r941934906


##########
docs/zh/latest/plugins/client-control.md:
##########
@@ -57,11 +67,15 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f03433
 
 ## 测试插件
 
-使用 `curl` 去测试:
+启用插件后,使用 `curl` 命令请求该路由:
 
 ```shell
 curl -i http://127.0.0.1:9080/index.html -d '123'
+```
 
+在配置插件时设置了 `max_body_size` 为 `1`,如果返回的 HTTP 响应头中带有 `413` 状态码,则表示插件生效:

Review Comment:
   ```suggestion
   因为在配置插件时设置了 `max_body_size` 为 `1`,所以返回的 HTTP 响应头中如果带有 `413` 状态码,则表示插件生效:
   ```



##########
docs/zh/latest/plugins/client-control.md:
##########
@@ -75,7 +89,7 @@ HTTP/1.1 413 Request Entity Too Large
 
 ## 禁用插件
 
-当您要禁用 `client-control` 插件时,这很简单,您可以在插件配置中删除相应的 json 配置,无需重新启动服务,它将立即生效:
+当你需要禁用该插件时,可以通过以下命令删除相应的 JSON 配置,APISIX 将会自动重新加载相关配置,无需重启服务:
 
 ```shell
 curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '

Review Comment:
   ```suggestion
   curl http://127.0.0.1:9080/apisix/admin/routes/1  \
   -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   ```



##########
docs/zh/latest/plugins/client-control.md:
##########
@@ -23,22 +28,27 @@ title: client-control
 
 ## 描述
 
-`client-control` 插件能够动态地控制 Nginx 处理客户端的请求的行为。
+`client-control` 插件能够动态地控制 NGINX 处理客户端的请求的行为。

Review Comment:
   Can you describe it more clearly? For example, by setting the size of the request body to control client access? The current description is too broad.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] juzhiyuan merged pull request #7620: docs: refactor client-control

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged PR #7620:
URL: https://github.com/apache/apisix/pull/7620


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7620: docs: refactor client-control

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7620:
URL: https://github.com/apache/apisix/pull/7620#discussion_r939762665


##########
docs/zh/latest/plugins/client-control.md:
##########
@@ -25,17 +30,21 @@ title: client-control
 
 `client-control` 插件能够动态地控制 Nginx 处理客户端的请求的行为。

Review Comment:
   ```suggestion
   `client-control` 插件能够动态地控制 NGINX 处理客户端请求的行为。
   ```



##########
docs/zh/latest/plugins/client-control.md:
##########
@@ -75,7 +88,7 @@ HTTP/1.1 413 Request Entity Too Large
 
 ## 禁用插件
 
-当您要禁用 `client-control` 插件时,这很简单,您可以在插件配置中删除相应的 json 配置,无需重新启动服务,它将立即生效:
+当你需要禁用该插件时,可以通过以下命令删除相应的 JSON 配置,APISIX 将会自动重新加载相关配置,无需重启服务:
 
 ```shell
 curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '

Review Comment:
   ```suggestion
   curl http://127.0.0.1:9080/apisix/admin/routes/1 \
     -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   ```



##########
docs/zh/latest/plugins/client-control.md:
##########
@@ -25,17 +30,21 @@ title: client-control
 
 `client-control` 插件能够动态地控制 Nginx 处理客户端的请求的行为。
 
-**这个插件需要 APISIX 在 [APISIX-Base](../FAQ.md#如何构建-apisix-base-环境) 上运行。**
+:::info 重要
+
+此插件需要 APISIX 在 [APISIX-Base](../FAQ.md#如何构建-apisix-base-环境) 环境上运行。更多信息请参考 [apisix-build-tools](https://github.com/api7/apisix-build-tools)。
+
+:::
 
 ## 属性
 
-| 名称      | 类型          | 必选项 | 默认值    | 有效值                                                                    | 描述                                                                                                                                         |
-| --------- | ------------- | ----------- | ---------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
-| max_body_size | integer        | 可选    |              | >= 0 | 动态设置 `client_max_body_size` 的大小 |
+| 名称      | 类型          | 必选项 | 有效值                                                                    | 描述                                                                                                                                         |
+| --------- | ------------- | ----------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
+| max_body_size | integer        | 否    | [0,...] | 动态设置 [`client_max_body_size`](https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size) 的大小。 |
 
-## 如何启用
+## 启用插件
 
-以下是一个示例,在指定路由中启用插件:
+以下示例展示了如何在指定路由上启用 `client-control` 插件,并设置 `max_body_size`:
 
 ```shell
 curl -i http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '

Review Comment:
   ```suggestion
   curl -i http://127.0.0.1:9080/apisix/admin/routes/1 \
     -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   ```



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on a diff in pull request #7620: docs: refactor client-control

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #7620:
URL: https://github.com/apache/apisix/pull/7620#discussion_r939750331


##########
docs/zh/latest/plugins/client-control.md:
##########
@@ -1,5 +1,10 @@
 ---
 title: client-control
+keywords:
+  - APISIX
+  - API 网关
+  - Client Control
+description: 本文介绍了 Apache APISIX proxy-control 插件的相关操作,你可以使用此插件动态地控制 Nginx 处理客户端的请求的行为。

Review Comment:
   ```suggestion
   description: 本文介绍了 Apache APISIX proxy-control 插件的相关操作,你可以使用此插件动态地控制 NGINX 处理客户端的请求的行为。
   ```



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on a diff in pull request #7620: docs: refactor client-control

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #7620:
URL: https://github.com/apache/apisix/pull/7620#discussion_r939750331


##########
docs/zh/latest/plugins/client-control.md:
##########
@@ -1,5 +1,10 @@
 ---
 title: client-control
+keywords:
+  - APISIX
+  - API 网关
+  - Client Control
+description: 本文介绍了 Apache APISIX proxy-control 插件的相关操作,你可以使用此插件动态地控制 Nginx 处理客户端的请求的行为。

Review Comment:
   ```suggestion
   description: 本文介绍了 Apache APISIX proxy-control 插件的相关操作,你可以使用此插件动态地控制 NGINX 处理客户端请求的行为。
   ```



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org