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/04/19 14:26:41 UTC

[GitHub] [apisix] hf400159 opened a new pull request, #6886: docs: update "General" Plugins

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

   ### Description
   
   Updates the documentation of the "General" Plugins.
   
   Fixes issue [6833](https://github.com/apache/apisix/issues/6833).
   
   ### Checklist
   
   - [ ] I have explained the need for this PR and the problem it solves
   - [ ] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] 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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/real-ip.md:
##########
@@ -23,27 +29,36 @@ title: real-ip
 
 ## 描述
 
-`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 `IP` 和端口。
+`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 IP 地址和端口。
 
-它工作方式和 `Nginx` 里 `ngx_http_realip_module` 模块一样,并且更为灵活。
+它的工作方式和 `Nginx` 中的 `ngx_http_realip_module` 模块一样,并且更加灵活。
 
-**该插件要求 `APISIX` 运行在 [APISIX-OpenResty](../how-to-build.md#步骤-6-为-apache-apisix-构建-openresty) 上。**
+:::info IMPORTANT
+
+该插件要求 `APISIX` 运行在 [APISIX-OpenResty](../how-to-build.md#步骤-6-为-apache-apisix-构建-openresty) 上。
+
+:::
 
 ## 属性
 
-| 名称      | 类型          | 必选项 | 默认值    | 有效值                                                                    | 描述                                                                                                                                         |
-| --------- | ------------- | ----------- | ---------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
-| source      | string        | 必填    |            | 任何 Nginx 变量,如 `arg_realip` 或 `http_x_forwarded_for` | 根据变量的值 `APISIX` 动态设置客户端的 `IP` 和端口。如果该值不包含端口,则不会更改客户端的端口。 |
-| trusted_addresses| array[string] | 可选    |            | `IP` 或 `CIDR` 范围列表 | 动态设置 `set_real_ip_from` 指令 |
+| 名称              | 类型          | 必选项 | 有效值                                                       | 描述                                                                                     |
+|-------------------|---------------|-------|-------------------------------------------------------------|------------------------------------------------------------------------------------------|
+| source            | string        | 是    | 任何 Nginx 变量,如 `arg_realip` 或 `http_x_forwarded_for` 。 | 动态设置客户端的 IP 地址和端口。如果该值不包含端口,则不会更改客户端的端口。                      |

Review Comment:
   ```suggestion
   | source            | string        | 是    | 任何 NGINX 变量,如 `arg_realip` 或 `http_x_forwarded_for` 。 | 动态设置客户端的 IP 地址和端口。如果该值不包含端口,则不会更改客户端的端口。                      |
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/batch-requests.md:
##########
@@ -23,92 +28,107 @@ title: batch-requests
 
 ## 描述
 
-`batch-requests` 插件可以一次接受多个请求并以 [http pipeline](https://en.wikipedia.org/wiki/HTTP_pipelining) 的方式在网关发起多个 http 请求,合并结果后再返回客户端,这在客户端需要访问多个接口时可以显著地提升请求性能。
+`batch-requests` 插件可以一次接受多个请求并以 [HTTP pipeline](https://en.wikipedia.org/wiki/HTTP_pipelining) 的方式在网关发起多个 HTTP 请求,合并结果后再返回客户端。
 
-> **提示**
->
-> 外层的 Http 请求头会自动设置到每一个独立请求中,如果独立请求中出现相同键值的请求头,那么只有独立请求的请求头会生效。
+在客户端需要访问多个 API 的情况下,这将显著提高性能。
+
+:::note
+
+外部批处理请求的 HTTP 请求头(除了以 `Content-` 开始的请求头,例如:`Content-Type`)适用于**批处理**中的每个请求。
+
+如果在外部请求和单个调用中都指定了相同的 HTTP 请求头,则单个调用的请求头优先。
+
+:::
 
 ## 属性
 
 无
 
 ## 接口
 
-插件会增加 `/apisix/batch-requests` 这个接口,需要通过 [public-api](../../../en/latest/plugins/public-api.md) 插件来暴露它。
+该插件会增加 `/apisix/batch-requests` 接口。
 
-## 如何启用
+:::note
 
-你需要在 `config.yaml` 里面启用 batch-requests 插件:
+你需要通过 [public-api](../../../zh/latest/plugins/public-api.md) 插件来暴露它。
 
-```
-# 加到 config.yaml
+:::
+
+## 启用插件
+
+该插件默认是禁用状态,你可以配置文件(`./conf/config.yaml`)添加如下配置启用 `batch-requests` 插件:
+
+```yaml title="conf/config.yaml"
 plugins:
-  - ... # plugin you need
+  - ...
   - batch-requests
 ```
 
-## 如何配置
+## 配置插件
 
-默认本插件限制请求体的大小不能大于 1 MiB。这个限制可以通过 `apisix/admin/plugin_metadata/batch-requests` 来修改。
+默认情况下,可以发送到 `/apisix/batch-requests` 的最大请求体不能大于 1 MiB。 你可以通过 `apisix/admin/plugin_metadata/batch-requests` 更改插件的此配置:
 
 ```shell
-curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/batch-requests -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/batch-requests \
+-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
     "max_body_size": 4194304
 }'
 ```
 
 ## 元数据
 
-| 名称          | 类型    | 必选项 | 默认值  | 有效值 | 描述                           |
-| ------------- | ------- | ------ | ------- | ------ | ------------------------------ |
-| max_body_size | integer | 必选   | 1048576 | > 0    | 请求体的最大大小,单位为字节。 |
+| 名称          | 类型     | 必选项 | 默认值   | 有效值 | 描述                          |
+| ------------- | ------- | -------| ------- | ------ | ---------------------------- |
+| max_body_size | integer | 是     | 1048576 |[1, ...]| 请求体的最大大小,单位:bytes。 |
 
-## 批量接口请求/响应
+## 请求和响应格式
 
-插件会为 `apisix` 创建一个 `/apisix/batch-requests` 的接口来处理你的批量请求。
+该插件会为 `apisix` 创建一个 `/apisix/batch-requests` 的接口来处理你的批量请求。

Review Comment:
   ```suggestion
   该插件会为 `apisix` 创建一个 `/apisix/batch-requests` 接口,用来来处理批量请求。
   ```



##########
docs/zh/latest/plugins/batch-requests.md:
##########
@@ -23,92 +28,107 @@ title: batch-requests
 
 ## 描述
 
-`batch-requests` 插件可以一次接受多个请求并以 [http pipeline](https://en.wikipedia.org/wiki/HTTP_pipelining) 的方式在网关发起多个 http 请求,合并结果后再返回客户端,这在客户端需要访问多个接口时可以显著地提升请求性能。
+`batch-requests` 插件可以一次接受多个请求并以 [HTTP pipeline](https://en.wikipedia.org/wiki/HTTP_pipelining) 的方式在网关发起多个 HTTP 请求,合并结果后再返回客户端。
 
-> **提示**
->
-> 外层的 Http 请求头会自动设置到每一个独立请求中,如果独立请求中出现相同键值的请求头,那么只有独立请求的请求头会生效。
+在客户端需要访问多个 API 的情况下,这将显著提高性能。
+
+:::note
+
+外部批处理请求的 HTTP 请求头(除了以 `Content-` 开始的请求头,例如:`Content-Type`)适用于**批处理**中的每个请求。
+
+如果在外部请求和单个调用中都指定了相同的 HTTP 请求头,则单个调用的请求头优先。
+
+:::
 
 ## 属性
 
 无
 
 ## 接口
 
-插件会增加 `/apisix/batch-requests` 这个接口,需要通过 [public-api](../../../en/latest/plugins/public-api.md) 插件来暴露它。
+该插件会增加 `/apisix/batch-requests` 接口。
 
-## 如何启用
+:::note
 
-你需要在 `config.yaml` 里面启用 batch-requests 插件:
+你需要通过 [public-api](../../../zh/latest/plugins/public-api.md) 插件来暴露它。
 
-```
-# 加到 config.yaml
+:::
+
+## 启用插件
+
+该插件默认是禁用状态,你可以配置文件(`./conf/config.yaml`)添加如下配置启用 `batch-requests` 插件:
+
+```yaml title="conf/config.yaml"
 plugins:
-  - ... # plugin you need
+  - ...
   - batch-requests
 ```
 
-## 如何配置
+## 配置插件
 
-默认本插件限制请求体的大小不能大于 1 MiB。这个限制可以通过 `apisix/admin/plugin_metadata/batch-requests` 来修改。
+默认情况下,可以发送到 `/apisix/batch-requests` 的最大请求体不能大于 1 MiB。 你可以通过 `apisix/admin/plugin_metadata/batch-requests` 更改插件的此配置:
 
 ```shell
-curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/batch-requests -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/batch-requests \
+-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
     "max_body_size": 4194304
 }'
 ```
 
 ## 元数据
 
-| 名称          | 类型    | 必选项 | 默认值  | 有效值 | 描述                           |
-| ------------- | ------- | ------ | ------- | ------ | ------------------------------ |
-| max_body_size | integer | 必选   | 1048576 | > 0    | 请求体的最大大小,单位为字节。 |
+| 名称          | 类型     | 必选项 | 默认值   | 有效值 | 描述                          |
+| ------------- | ------- | -------| ------- | ------ | ---------------------------- |
+| max_body_size | integer | 是     | 1048576 |[1, ...]| 请求体的最大大小,单位:bytes。 |
 
-## 批量接口请求/响应
+## 请求和响应格式
 
-插件会为 `apisix` 创建一个 `/apisix/batch-requests` 的接口来处理你的批量请求。
+该插件会为 `apisix` 创建一个 `/apisix/batch-requests` 的接口来处理你的批量请求。

Review Comment:
   ```suggestion
   该插件会为 `apisix` 创建一个 `/apisix/batch-requests` 接口,用来处理批量请求。
   ```



-- 
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] spacewander merged pull request #6886: docs: update "General" Plugins

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


-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/batch-requests.md:
##########
@@ -192,4 +213,9 @@ curl --location --request POST 'http://127.0.0.1:9080/apisix/batch-requests' \
 
 ## 禁用插件
 
-正常情况不需要禁用本插件,如有需要,在 `/conf/config.yaml` 中新建一个所需的 `plugins` 列表,以覆盖原列表。
+如果你想禁用插件,你可以将 `batch-requests` 从配置文件中的插件列表删除,重新加载 APISIX 后就可以生效。

Review Comment:
   ```suggestion
   如果你使用完毕并打算禁用插件,可将 `batch-requests` 从配置文件的插件列表中删除,重新加载 APISIX 后即可生效。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/gzip.md:
##########
@@ -25,26 +30,31 @@ title: gzip
 
 `gzip` 插件能动态设置 `Nginx` 的压缩行为。

Review Comment:
   ```suggestion
   `gzip` 插件能动态设置 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] SylviaBABY commented on pull request #6886: docs: update "General" Plugins

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on PR #6886:
URL: https://github.com/apache/apisix/pull/6886#issuecomment-1108161048

   LGTM


-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/echo.md:
##########
@@ -64,21 +79,25 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
 
 ## 测试插件
 
-* 成功:
+通过上述命令启用插件后,你可以使用如下命令测试插件是否启用成功:
 
 ```shell
-$ curl -i http://127.0.0.1:9080/hello
+curl -i http://127.0.0.1:9080/hello
+```
+
+```
 HTTP/1.1 200 OK
 ...
 before the body modification hello world
 ```
 
 ## 禁用插件
 
-当您要禁用 `echo` 插件时,这很简单,您可以在插件配置中删除相应的 json 配置,无需重新启动服务,它将立即生效:
+当你需要禁用 `echo` 插件时,你可以通过以下命令删除相应的 `JSON` 配置,APISIX 将会自动重新加载相关配置,无需重启服务:

Review Comment:
   ```suggestion
   当你需要禁用 `echo` 插件时,可通过以下命令删除相应的 `JSON` 配置,APISIX 将会自动重新加载相关配置,无需重启服务:
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/real-ip.md:
##########
@@ -23,27 +29,36 @@ title: real-ip
 
 ## 描述
 
-`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 `IP` 和端口。
+`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 IP 地址和端口。
 
-它工作方式和 `Nginx` 里 `ngx_http_realip_module` 模块一样,并且更为灵活。
+它的工作方式和 `Nginx` 中的 `ngx_http_realip_module` 模块一样,并且更加灵活。
 
-**该插件要求 `APISIX` 运行在 [APISIX-OpenResty](../how-to-build.md#步骤-6-为-apache-apisix-构建-openresty) 上。**
+:::info IMPORTANT
+
+该插件要求 `APISIX` 运行在 [APISIX-OpenResty](../how-to-build.md#步骤-6-为-apache-apisix-构建-openresty) 上。

Review Comment:
   ```suggestion
   该插件要求 Apache APISIX 运行在 [APISIX-OpenResty](../how-to-build.md#步骤-6-为-apache-apisix-构建-openresty) 上。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/real-ip.md:
##########
@@ -23,27 +29,36 @@ title: real-ip
 
 ## 描述
 
-`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 `IP` 和端口。
+`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 IP 地址和端口。
 
-它工作方式和 `Nginx` 里 `ngx_http_realip_module` 模块一样,并且更为灵活。
+它的工作方式和 `Nginx` 中的 `ngx_http_realip_module` 模块一样,并且更加灵活。

Review Comment:
   ```suggestion
   它的工作方式和 NGINX 中的 `ngx_http_realip_module` 模块一样,并且更加灵活。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/real-ip.md:
##########
@@ -23,27 +29,36 @@ title: real-ip
 
 ## 描述
 
-`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 `IP` 和端口。
+`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 IP 地址和端口。
 
-它工作方式和 `Nginx` 里 `ngx_http_realip_module` 模块一样,并且更为灵活。
+它的工作方式和 `Nginx` 中的 `ngx_http_realip_module` 模块一样,并且更加灵活。

Review Comment:
   ```suggestion
   它的工作方式和 Nginx 中的 `ngx_http_realip_module` 模块一样,并且更加灵活。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/echo.md:
##########
@@ -23,29 +29,38 @@ title: echo
 
 ## 描述
 
-echo 可以帮助用户尽可能全面地了解如何开发 APISIX 插件。
+`echo` 插件可以帮助用户尽可能的全面了解如何开发 APISIX 插件。

Review Comment:
   ```suggestion
   `echo` 插件可以帮助用户尽可能地全面了解如何开发 APISIX 插件。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/server-info.md:
##########
@@ -89,18 +95,17 @@ $ curl http://127.0.0.1:9090/v1/server_info -s | jq .
 }
 ```
 
-Apache APISIX Dashboard 会收集上报到 etcd 中的服务信息,因此你也可以通过 APISIX Dashboard 来查看这些数据。
+:::tip
+
+你可以通过 [APISIX Dashboard](/docs/dashboard/USER_GUIDE) 查看服务信息报告。
+
+:::
 
 ## 禁用插件
 
-通过移除配置文件 `apisix/conf/config.yaml` 插件列表中的 `server-info`,即可方便地禁用该插件。
+如果你想禁用插件,可以将 `server-info` 从配置文件中的插件列表删除,重新加载 APISIX 后就可以生效。

Review Comment:
   ```suggestion
   如果你想禁用插件,可以将 `server-info` 从配置文件中的插件列表删除,重新加载 APISIX 后即可生效。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/gzip.md:
##########
@@ -25,26 +30,31 @@ title: gzip
 
 `gzip` 插件能动态设置 `Nginx` 的压缩行为。
 
-**该插件要求 `APISIX` 运行在 [APISIX-OpenResty](../how-to-build.md#步骤-6-为-apache-apisix-构建-openresty) 上。**
+:::info IMPORTANT
+
+该插件要求 `APISIX` 运行在 [APISIX-OpenResty](../how-to-build.md#步骤-6-为-apache-apisix-构建-openresty) 上。

Review Comment:
   ```suggestion
   该插件要求 Apache APISIX 运行在 [APISIX-OpenResty](../how-to-build.md#步骤-6-为-apache-apisix-构建-openresty) 上。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/echo.md:
##########
@@ -23,29 +29,38 @@ title: echo
 
 ## 描述
 
-echo 可以帮助用户尽可能全面地了解如何开发 APISIX 插件。
+`echo` 插件可以帮助用户尽可能的全面了解如何开发 APISIX 插件。
+
+该插件展示了如何在常见的 `phase` 中实现相应的功能,常见的 `phase` 包括:init, rewrite, access, balancer, header filter, body filter 以及 log。
 
-该插件展示了如何在常见的 phase 中实现相应的功能,常见的 phase 包括:init, rewrite, access, balancer, header filter, body filter 以及 log。
+:::caution WARNING
 
-**注意:该插件仅用作示例,并没有处理一些特别的场景。请勿将之用于生产环境上!**
+`echo` 插件只能用作示例,并不能处理一些特别的场景。**请勿将该插件用在生产环境中!**
+
+:::
 
 ## 属性
 
-| 名称        | 类型   | 必选项 | 默认值 | 有效值 | 描述                                                                                     |
-| ----------- | ------ | ------ | ------ | ------ | ---------------------------------------------------------------------------------------- |
-| before_body | string | 可选   |        |        | 在 body 属性之前添加的内容,如果 body 属性没有指定将添加在 upstream response body 之前。 |
-| body        | string | 可选   |        |        | 返回给客户端的响应内容,它将覆盖 upstream 返回的响应 body。                              |
-| after_body  | string | 可选   |        |        | 在 body 属性之后添加的内容,如果 body 属性没有指定将在 upstream 响应 body 之后添加。     |
-| headers     | object | 可选   |        |        | 返回值的 headers                                                                         |
+| 名称        | 类型   | 必选项  |  描述                                                                                            |
+| ----------- | ------ | ------ | ----------------------------------------------------------------------------------------------- |
+| before_body | string | 否     | 在 `body` 属性之前添加的内容,如果 `body` 属性没有指定,就会将其将添加在 Upstream response body 之前。 |
+| body        | string | 否     | 返回给客户端的响应内容,它将覆盖 Upstream 返回的响应 `body`。                                        |
+| after_body  | string | 否     | 在 `body` 属性之后添加的内容,如果 body 属性没有指定将在 Upstream 响应 `body` 之后添加。              |
+| headers     | object | 否     | 返回值的 headers。                                                                                |
+
+:::note
 
-参数 before_body,body 和 after_body 至少要存在一个
+参数 `before_body`、`body` 和 `after_body` 至少要配置一个**

Review Comment:
   ```suggestion
   参数 `before_body`、`body` 和 `after_body` 至少要配置一个
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/echo.md:
##########
@@ -23,29 +29,38 @@ title: echo
 
 ## 描述
 
-echo 可以帮助用户尽可能全面地了解如何开发 APISIX 插件。
+`echo` 插件可以帮助用户尽可能的全面了解如何开发 APISIX 插件。
+
+该插件展示了如何在常见的 `phase` 中实现相应的功能,常见的 `phase` 包括:init, rewrite, access, balancer, header filter, body filter 以及 log。
 
-该插件展示了如何在常见的 phase 中实现相应的功能,常见的 phase 包括:init, rewrite, access, balancer, header filter, body filter 以及 log。
+:::caution WARNING
 
-**注意:该插件仅用作示例,并没有处理一些特别的场景。请勿将之用于生产环境上!**
+`echo` 插件只能用作示例,并不能处理一些特别的场景。**请勿将该插件用在生产环境中!**
+
+:::
 
 ## 属性
 
-| 名称        | 类型   | 必选项 | 默认值 | 有效值 | 描述                                                                                     |
-| ----------- | ------ | ------ | ------ | ------ | ---------------------------------------------------------------------------------------- |
-| before_body | string | 可选   |        |        | 在 body 属性之前添加的内容,如果 body 属性没有指定将添加在 upstream response body 之前。 |
-| body        | string | 可选   |        |        | 返回给客户端的响应内容,它将覆盖 upstream 返回的响应 body。                              |
-| after_body  | string | 可选   |        |        | 在 body 属性之后添加的内容,如果 body 属性没有指定将在 upstream 响应 body 之后添加。     |
-| headers     | object | 可选   |        |        | 返回值的 headers                                                                         |
+| 名称        | 类型   | 必选项  |  描述                                                                                            |
+| ----------- | ------ | ------ | ----------------------------------------------------------------------------------------------- |
+| before_body | string | 否     | 在 `body` 属性之前添加的内容,如果 `body` 属性没有指定,就会将其将添加在 Upstream response body 之前。 |

Review Comment:
   ```suggestion
   | before_body | string | 否     | 在 `body` 属性之前添加的内容,如果 `body` 属性没有指定,就会将其添加在 Upstream response body 之前。 |
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/redirect.md:
##########
@@ -63,10 +71,11 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f1
 }'
 ```
 
-我们可以在新的 URI 中使用 Nginx 内置的任意变量:
+你也可以在新的 URI 中使用 Nginx 内置的任意变量:

Review Comment:
   ```suggestion
   你也可以在新的 URI 中使用 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] SylviaBABY commented on a diff in pull request #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/batch-requests.md:
##########
@@ -1,5 +1,10 @@
 ---
 title: batch-requests
+keywords:
+  - APISIX
+  - Plugin
+  - Batch Requests
+description: This document contains information about the Apache APISIX batch-request Plugin.

Review Comment:
   ```suggestion
   description: This document contains information about the Apache APISIX `batch-request` Plugin.
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/redirect.md:
##########
@@ -23,29 +28,32 @@ title: redirect
 
 ## 描述
 
-URI 重定向插件。
+`redirect`  插件可用于配置 URI 重定向。
 
 ## 属性
 
-| Name          | Type    | Requirement | Default | Valid      | Description                                                                                                                                                                                                                   |
-| ------------- | ------- | ----------- | ------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| http_to_https | boolean | 可选        | false   |            | 当设置为 `true` 并且请求是 http 时,会自动 301 重定向为 https,uri 保持不变                                                                                                                                                   |
-| uri           | string  | 可选        |         |            | 可以包含 Nginx 变量的 URI,例如:`/test/index.html`, `$uri/index.html`。你可以通过类似于 `$ {xxx}` 的方式引用变量,以避免产生歧义,例如:`${uri}foo/index.html`。若你需要保留 `$` 字符,那么使用如下格式:`/\$foo/index.html` |
-| regex_uri | array[string] | 可选        |         |                   | 转发到上游的新 `uri` 地址,使用正则表达式匹配来自客户端的 `uri`,当匹配成功后使用模板替换发送重定向到客户端,未匹配成功时将客户端请求的 `uri` 转发至上游。`uri` 和 `regex_uri` 不可以同时存在。例如:["^/iresty/(.*)/(.*)/(.*)","/$1-$2-$3"] 第一个元素代表匹配来自客户端请求的 `uri` 正则表达式,第二个元素代表匹配成功后发送重定向到客户端的 `uri` 模板。 |
-| ret_code      | integer | 可选        | 302     | [200, ...] | 请求响应码                                                                                                                                                                                                                    |
-| encode_uri    | boolean | 可选        | false   |       | 当设置为 `true` 时,对返回的 `Location` header 进行编码,编码格式参考 [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986) |
-| append_query_string    | boolean | optional    | false   |       | 当设置为 `true` 时,将请求 url 的 query 部分添加到 Location 里。如果在 `uri` 或 `regex_uri` 中配置了 query,那么请求的 query 会被追加在这个 query 后,以 `&` 分隔。 注意:如果已经处理了 query,比如使用了 nginx 变量 `$request_uri`,那么启用此功能会造成 query 重复 |
+| 名称                | 类型           |   必选项  |  默认值  | 有效值     |                      描述                                                                                                                                                 |
+| ------------------- | ------------- | --------- | ------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| http_to_https       | boolean       | 是        | false   | [true,false] | 当设置为 `true` 并且请求是 HTTP 时,它将被重定向具有相同 URI 和 301 状态码的 HTTPS。 |
+| uri                 | string        | 是        |         |             | 要重定向到的 URI,可以包含 Nginx 变量。例如:`/test/index.htm`, `$uri/index.html`,`${uri}/index.html`。如果你引入了一个不存在的变量,它不会报错,而是将其视为一个空变量。  |
+| regex_uri           | array[string] | 是        |         |             | 将来自客户端的 URL 与正则表达式匹配并重定向。当匹配成功后使用模板替换发送重定向到客户端,如果未匹配成功会将客户端请求的 URI 转发至上游。 和 `regex_uri` 不可以同时存在。例如:["^/iresty/(.)/(.)/(.*)","/$1-$2-$3"] 第一个元素代表匹配来自客户端请求的 URI 正则表达式,第二个元素代表匹配成功后发送重定向到客户端的 URI 模板。 |
+| ret_code            | integer       | 是        | 302     | [200, ...]  | HTTP 响应码 |
+| encode_uri          | boolean       | 是        | false   | [true,false]  | 当设置为 `true` 时,对返回的 `Location` Header 按照 [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986)的编码格式进行编码。 |
+| append_query_string | boolean       | 是        | false   | [true,false]  | 当设置为 `true` 时,将原始请求中的查询字符串添加到 `Location` Header。如果已配置 `uri` 或 `regex_uri` 已经包含查询字符串,则请求中的查询字符串将附加一个`&`。如果你已经处理过查询字符串(例如,使用 Nginx 变量 `$request_uri`),请不要再使用该参数以避免重复。 |
 
-`http_to_https`,`uri` 或 `regex_uri` 三个中只能配置一个。
+:::note
 
-## 示例
+`http_to_https`,`uri` 和 `regex_uri` 只能配置其中一个属性。

Review Comment:
   ```suggestion
   `http_to_https`、`uri` 和 `regex_uri` 只能配置其中一个属性。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/batch-requests.md:
##########
@@ -23,92 +28,107 @@ title: batch-requests
 
 ## 描述
 
-`batch-requests` 插件可以一次接受多个请求并以 [http pipeline](https://en.wikipedia.org/wiki/HTTP_pipelining) 的方式在网关发起多个 http 请求,合并结果后再返回客户端,这在客户端需要访问多个接口时可以显著地提升请求性能。
+`batch-requests` 插件可以一次接受多个请求并以 [HTTP pipeline](https://en.wikipedia.org/wiki/HTTP_pipelining) 的方式在网关发起多个 HTTP 请求,合并结果后再返回客户端。
 
-> **提示**
->
-> 外层的 Http 请求头会自动设置到每一个独立请求中,如果独立请求中出现相同键值的请求头,那么只有独立请求的请求头会生效。
+在客户端需要访问多个 API 的情况下,这将显著提高性能。
+
+:::note
+
+外部批处理请求的 HTTP 请求头(除了以 `Content-` 开始的请求头,例如:`Content-Type`)适用于**批处理**中的每个请求。
+
+如果在外部请求和单个调用中都指定了相同的 HTTP 请求头,则单个调用的请求头优先。
+
+:::
 
 ## 属性
 
 无
 
 ## 接口
 
-插件会增加 `/apisix/batch-requests` 这个接口,需要通过 [public-api](../../../en/latest/plugins/public-api.md) 插件来暴露它。
+该插件会增加 `/apisix/batch-requests` 接口。
 
-## 如何启用
+:::note
 
-你需要在 `config.yaml` 里面启用 batch-requests 插件:
+你需要通过 [public-api](../../../zh/latest/plugins/public-api.md) 插件来暴露它。
 
-```
-# 加到 config.yaml
+:::
+
+## 启用插件
+
+该插件默认是禁用状态,你可以配置文件(`./conf/config.yaml`)添加如下配置启用 `batch-requests` 插件:

Review Comment:
   ```suggestion
   该插件默认为禁用状态,你可以在配置文件(`./conf/config.yaml`)中添加如下配置来启用 `batch-requests` 插件:
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/echo.md:
##########
@@ -23,29 +29,38 @@ title: echo
 
 ## 描述
 
-echo 可以帮助用户尽可能全面地了解如何开发 APISIX 插件。
+`echo` 插件可以帮助用户尽可能的全面了解如何开发 APISIX 插件。
+
+该插件展示了如何在常见的 `phase` 中实现相应的功能,常见的 `phase` 包括:init, rewrite, access, balancer, header filter, body filter 以及 log。
 
-该插件展示了如何在常见的 phase 中实现相应的功能,常见的 phase 包括:init, rewrite, access, balancer, header filter, body filter 以及 log。
+:::caution WARNING
 
-**注意:该插件仅用作示例,并没有处理一些特别的场景。请勿将之用于生产环境上!**
+`echo` 插件只能用作示例,并不能处理一些特别的场景。**请勿将该插件用在生产环境中!**
+
+:::
 
 ## 属性
 
-| 名称        | 类型   | 必选项 | 默认值 | 有效值 | 描述                                                                                     |
-| ----------- | ------ | ------ | ------ | ------ | ---------------------------------------------------------------------------------------- |
-| before_body | string | 可选   |        |        | 在 body 属性之前添加的内容,如果 body 属性没有指定将添加在 upstream response body 之前。 |
-| body        | string | 可选   |        |        | 返回给客户端的响应内容,它将覆盖 upstream 返回的响应 body。                              |
-| after_body  | string | 可选   |        |        | 在 body 属性之后添加的内容,如果 body 属性没有指定将在 upstream 响应 body 之后添加。     |
-| headers     | object | 可选   |        |        | 返回值的 headers                                                                         |
+| 名称        | 类型   | 必选项  |  描述                                                                                            |
+| ----------- | ------ | ------ | ----------------------------------------------------------------------------------------------- |
+| before_body | string | 否     | 在 `body` 属性之前添加的内容,如果 `body` 属性没有指定,就会将其将添加在 Upstream response body 之前。 |
+| body        | string | 否     | 返回给客户端的响应内容,它将覆盖 Upstream 返回的响应 `body`。                                        |
+| after_body  | string | 否     | 在 `body` 属性之后添加的内容,如果 body 属性没有指定将在 Upstream 响应 `body` 之后添加。              |
+| headers     | object | 否     | 返回值的 headers。                                                                                |
+
+:::note
 
-参数 before_body,body 和 after_body 至少要存在一个
+参数 `before_body`、`body` 和 `after_body` 至少要配置一个**
 
-## 如何启用
+:::
 
-为特定路由启用 echo 插件。
+## 启用插件
+
+以下示例为你展示了如何在指定路由中启用 `echo` 插件。

Review Comment:
   ```suggestion
   以下示例展示了如何在指定路由中启用 `echo` 插件。
   ```



-- 
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 commented on a diff in pull request #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/ext-plugin-post-req.md:
##########
@@ -23,8 +28,6 @@ title: ext-plugin-post-req
 
 ## 描述
 
-`ext-plugin-post-req` 插件的功能与 `ext-plugin-pre-req` 插件类似。
+`ext-plugin-post-req` 插件的功能与 `ext-plugin-pre-req` 插件的不同之处在与,`ext-plugin-post-req` 插件是在内置 Lua 插件执行之后且在请求到达上游之前工作。

Review Comment:
   ```suggestion
   `ext-plugin-post-req` 插件的功能与 `ext-plugin-pre-req` 插件的不同之处在于:`ext-plugin-post-req` 插件是在内置 Lua 插件执行之后且在请求到达上游之前工作。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/batch-requests.md:
##########
@@ -192,4 +213,9 @@ curl --location --request POST 'http://127.0.0.1:9080/apisix/batch-requests' \
 
 ## 禁用插件
 
-正常情况不需要禁用本插件,如有需要,在 `/conf/config.yaml` 中新建一个所需的 `plugins` 列表,以覆盖原列表。
+如果你想禁用插件,你可以将 `batch-requests` 从配置文件中的插件列表删除,重新加载 APISIX 后就可以生效。

Review Comment:
   ```suggestion
   如果使用完毕并打算禁用插件,可将 `batch-requests` 从配置文件的插件列表中删除,重新加载 APISIX 后即可生效。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/echo.md:
##########
@@ -1,7 +1,13 @@
 ---
 title: echo
+keywords:
+  - APISIX
+  - Plugin
+  - Echo
+description: This document contains information about the Apache APISIX echo Plugin.

Review Comment:
   ```suggestion
   description: This document contains information about the Apache APISIX `echo` Plugin.
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/gzip.md:
##########
@@ -84,10 +97,11 @@ Warning: <FILE>" to save to a file.
 
 ## 禁用插件
 
-想要禁用该插件时很简单,在路由 `plugins` 配置块中删除对应 `JSON` 配置,不需要重启服务,即可立即生效禁用该插件。
+当你需要禁用 `gzip` 插件时,可以通过以下命令删除相应的 `JSON` 配置,APISIX 将会自动重新加载相关配置,无需重启服务:

Review Comment:
   ```suggestion
   当你需要禁用 `gzip` 插件时,可以通过以下命令删除相应的 JSON 配置,APISIX 将会自动重新加载相关配置,无需重启服务:
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/gzip.md:
##########
@@ -25,26 +30,31 @@ title: gzip
 
 `gzip` 插件能动态设置 `Nginx` 的压缩行为。

Review Comment:
   ```suggestion
   `gzip` 插件能动态设置 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] SylviaBABY commented on a diff in pull request #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/batch-requests.md:
##########
@@ -23,92 +28,107 @@ title: batch-requests
 
 ## 描述
 
-`batch-requests` 插件可以一次接受多个请求并以 [http pipeline](https://en.wikipedia.org/wiki/HTTP_pipelining) 的方式在网关发起多个 http 请求,合并结果后再返回客户端,这在客户端需要访问多个接口时可以显著地提升请求性能。
+`batch-requests` 插件可以一次接受多个请求并以 [HTTP pipeline](https://en.wikipedia.org/wiki/HTTP_pipelining) 的方式在网关发起多个 HTTP 请求,合并结果后再返回客户端。
 
-> **提示**
->
-> 外层的 Http 请求头会自动设置到每一个独立请求中,如果独立请求中出现相同键值的请求头,那么只有独立请求的请求头会生效。
+在客户端需要访问多个 API 的情况下,这将显著提高性能。
+
+:::note
+
+外部批处理请求的 HTTP 请求头(除了以 `Content-` 开始的请求头,例如:`Content-Type`)适用于**批处理**中的每个请求。
+
+如果在外部请求和单个调用中都指定了相同的 HTTP 请求头,则单个调用的请求头优先。
+
+:::
 
 ## 属性
 
 无
 
 ## 接口
 
-插件会增加 `/apisix/batch-requests` 这个接口,需要通过 [public-api](../../../en/latest/plugins/public-api.md) 插件来暴露它。
+该插件会增加 `/apisix/batch-requests` 接口。
 
-## 如何启用
+:::note
 
-你需要在 `config.yaml` 里面启用 batch-requests 插件:
+你需要通过 [public-api](../../../zh/latest/plugins/public-api.md) 插件来暴露它。
 
-```
-# 加到 config.yaml
+:::
+
+## 启用插件
+
+该插件默认是禁用状态,你可以配置文件(`./conf/config.yaml`)添加如下配置启用 `batch-requests` 插件:
+
+```yaml title="conf/config.yaml"
 plugins:
-  - ... # plugin you need
+  - ...
   - batch-requests
 ```
 
-## 如何配置
+## 配置插件
 
-默认本插件限制请求体的大小不能大于 1 MiB。这个限制可以通过 `apisix/admin/plugin_metadata/batch-requests` 来修改。
+默认情况下,可以发送到 `/apisix/batch-requests` 的最大请求体不能大于 1 MiB。 你可以通过 `apisix/admin/plugin_metadata/batch-requests` 更改插件的此配置:
 
 ```shell
-curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/batch-requests -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/batch-requests \
+-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
     "max_body_size": 4194304
 }'
 ```
 
 ## 元数据
 
-| 名称          | 类型    | 必选项 | 默认值  | 有效值 | 描述                           |
-| ------------- | ------- | ------ | ------- | ------ | ------------------------------ |
-| max_body_size | integer | 必选   | 1048576 | > 0    | 请求体的最大大小,单位为字节。 |
+| 名称          | 类型     | 必选项 | 默认值   | 有效值 | 描述                          |
+| ------------- | ------- | -------| ------- | ------ | ---------------------------- |
+| max_body_size | integer | 是     | 1048576 |[1, ...]| 请求体的最大大小,单位:bytes。 |
 
-## 批量接口请求/响应
+## 请求和响应格式
 
-插件会为 `apisix` 创建一个 `/apisix/batch-requests` 的接口来处理你的批量请求。
+该插件会为 `apisix` 创建一个 `/apisix/batch-requests` 的接口来处理你的批量请求。
 
-### 接口请求参数:
+### Request
 
-| 参数名   | 类型                        | 可选项 | 默认值 | 有效值 | 描述                             |
-| -------- | --------------------------- | ------ | ------ | ------ | -------------------------------- |
-| query    | object                      | 可选   |        |        | 给所有请求都携带的 `query string` |
-| headers  | object                      | 可选   |        |        | 给所有请求都携带的 `header`      |
-| timeout  | number                      | 可选   | 30000  |        | 聚合请求的超时时间,单位为 `ms`  |
-| pipeline | [HttpRequest](#httprequest) | 必须   |        |        | Http 请求的详细信息              |
+| 参数名   | 类型                         | 必选项 | 默认值 |  描述                             |
+| -------- | --------------------------- | ------ | ------ |  -------------------------------- |
+| query    | object                      | 否     |        | 给所有请求都携带的 `query string`。 |
+| headers  | object                      | 否     |        | 给所有请求都携带的 `header`。       |
+| timeout  | number                      | 否     | 30000  | 聚合请求的超时时间,单位为 `ms`。    |
+| pipeline | [HttpRequest](#httprequest) | 是     |        | HTTP 请求的详细信息。               |
 
 #### HttpRequest
 
-| 参数名     | 类型    | 可选 | 默认值 | 有效值                                                                           | 描述                                                                      |
-| ---------- | ------- | ---- | ------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| version    | string  | 可选 | 1.1    | [1.0, 1.1]                                                                       | 请求用的 `http` 协议版本                                                  |
-| method     | string  | 可选 | GET    | ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE", "PURGE"] | 请求使用的 `http` 方法                                                    |
-| query      | object  | 可选 |        |                                                                                  | 独立请求所携带的 `query string`, 如果 `Key` 和全局的有冲突,以此设置为主。 |
-| headers    | object  | 可选 |        |                                                                                  | 独立请求所携带的 `header`, 如果 `Key` 和全局的有冲突,以此设置为主。      |
-| path       | string  | 必须 |        |                                                                                  | 请求路径                                                                  |
-| body       | string  | 可选 |        |                                                                                  | 请求体                                                                    |
-| ssl_verify | boolean | 可选 | false  |                                                                                  | 验证 SSL 证书与主机名是否匹配                                             |
+| 参数名      | 类型    | 必选项    | 默认值  | 有效值                                                                            | 描述                                                                  |
+| ---------- | ------- | -------- | ------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
+| version    | string  | 否       | 1.1     | [1.0, 1.1]                                                                       | 请求所使用的 HTTP 协议版本。                                              |
+| method     | string  | 否       | GET     | ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"] | 请求使用的 HTTP 方法。                                                   |
+| query      | object  | 否       |         |                                                                                  | 独立请求所携带的 `query string`, 如果 `Key` 和全局的有冲突,以此设置为主。 |
+| headers    | object  | 否       |         |                                                                                  | 独立请求所携带的 `header`, 如果 `Key` 和全局的有冲突,以此设置为主。       |
+| path       | string  | 是       |         |                                                                                  | HTTP 请求路径。                                                        |
+| body       | string  | 否       |         |                                                                                  | HTTP 请求体。                                                          |
+| ssl_verify | boolean | 否       | false   |                                                                                  | 验证 SSL 证书与主机名是否匹配。                                          |
 
-### 接口响应参数:
+### 响应参数:
 
-返回值为一个 [HttpResponse](#httpresponse) 的 `数组`。
+返回值是一个 [HttpResponse](#httpresponse) 的 `数组`。
 
 #### HttpResponse
 
-| 参数名  | 类型    | 描述                |
+| 参数名   | 类型    | 描述                 |
 | ------- | ------- | ------------------- |
-| status  | integer | Http 请求的状态码   |
-| reason  | string  | Http 请求的返回信息 |
-| body    | string  | Http 请求的响应体   |
-| headers | object  | Http 请求的响应头   |
+| status  | integer | HTTP 请求的状态码。   |
+| reason  | string  | HTTP 请求的返回信息。 |
+| body    | string  | HTTP 请求的响应体。   |
+| headers | object  | HTTP 请求的响应头。   |
+
+## 修改自定义 URI
 
-## 如何修改自定义 uri
+你可以通过 [public-api](../../../en/latest/plugins/public-api.md) 插件设置自定义 URI。
 
-我们可以使用 [public-api](../../../en/latest/plugins/public-api.md) 插件轻易的设置自定义 uri。只需要在创建路由时设置需要的 uri 并改变 `public-api` 插件的配置即可。
+你可以在创建 Route 时设置所需的 URI 并更改 `public-api` 插件的配置:

Review Comment:
   ```suggestion
   只需在创建 Route 时设置所需的 URI 并更改 `public-api` 插件的配置:
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/real-ip.md:
##########
@@ -23,27 +29,36 @@ title: real-ip
 
 ## 描述
 
-`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 `IP` 和端口。
+`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 IP 地址和端口。

Review Comment:
   ```suggestion
   `real-ip` 插件用于动态改变传递到 Apache APISIX 客户端的 IP 地址和端口。
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/gzip.md:
##########
@@ -25,26 +30,31 @@ title: gzip
 
 `gzip` 插件能动态设置 `Nginx` 的压缩行为。

Review Comment:
   ```suggestion
   `gzip` 插件能动态设置 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] SylviaBABY commented on a diff in pull request #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/server-info.md:
##########
@@ -23,63 +29,63 @@ title: server-info
 
 ## 描述
 
-`server-info` 是一款能够定期将服务基本信息上报至 etcd 的插件。
+`server-info` 插件可以定期将服务基本信息上报至 etcd。
 
 服务信息中每一项的含义如下:
 
-| 名称             | 类型    | 描述                                                                                                                    |
+| 名称             | 类型    | 描述                                                                                                                   |
 | ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
-| boot_time        | integer | APISIX 服务实例的启动时间(UNIX 时间戳),如果对 APISIX 进行热更新操作,该值将被重置;普通的 reload 操作不会影响该值。               |
-| id               | string  | APISIX 服务实例 id 。                                                                                                   |
-| etcd_version     | string  | etcd 集群的版本信息,如果 APISIX 和 etcd 集群之间存在网络分区,该值将设置为 `"unknown"`。                                       |
+| boot_time        | integer | APISIX 服务实例的启动时间(UNIX 时间戳),如果对 APISIX 进行热更新操作,该值将被重置。普通的 reload 操作不会影响该值。         |
+| id               | string  | APISIX 服务实例 id。                                                                                                   |
+| etcd_version     | string  | etcd 集群的版本信息,如果 APISIX 和 etcd 集群之间存在网络分区,该值将设置为 `"unknown"`。                                   |
 | version          | string  | APISIX 版本信息。                                                                                                       |
-| hostname         | string  | APISIX 所部署的机器或 pod 的主机名信息。                                                                                   |
+| hostname         | string  | 部署 APISIX 的主机或 Pod 的主机名信息。                                                                                  |
 
-## 插件属性
+## 属性
 
-无
+无。
 
 ## 插件接口
 
 该插件在 [Control API](../control-api.md) 下暴露了一个 API 接口 `/v1/server_info`。
 
 ## 启用插件
 
-在配置文件 `apisix/conf/config.yaml` 的插件列表中添加 `server-info`, 即可启用该插件。
+该插件默认是禁用状态,你可以在配置文件(`./conf/config.yaml`)中添加如下配置启用 `server-info` 插件。
 
-```
+```yaml title="conf/config.yaml"
 plugins:                          # plugin list
-  - example-plugin
-  - limit-req
-  - node-status
+  - ...
   - server-info
-  - jwt-auth
-  - zipkin
-  ......
 ```
 
-## 如何自定义服务信息上报配置
+## 自定义服务信息上报配置
+
+我们可以在 `./conf/config.yaml` 文件的 `plugin_attr` 部分修改上报配置。
 
-我们可以在 `conf/config.yaml` 文件的 `plugin_attr` 一节中修改上报配置。
+下表是可以自定义配置的参数:
 
-| 名称            | 类型    | 默认值 | 描述                                                               |
+| 名称            | 类型    | 默认值  | 描述                                                               |
 | --------------- | ------- | ------ | --------------------------------------------------------------- |
-| report_ttl      | integer | 36   | etcd 中服务信息保存的 TTL(单位:秒,最大值:86400,最小值:3)|
+| report_ttl      | integer | 36     | etcd 中服务信息保存的 TTL(单位:秒,最大值:86400,最小值:3)。|
 
-下面的例子将 `report_ttl` 修改成了 1 分钟:
+以下是示例是修改配置文件(`conf/config.yaml`)中的 `plugin_attr` 部分将 `report_ttl` 设置为 1 分钟:

Review Comment:
   ```suggestion
   以下示例则是通过修改配置文件(`conf/config.yaml`)中的 `plugin_attr` 部分将 `report_ttl` 设置为 1 分钟:
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/server-info.md:
##########
@@ -23,63 +29,63 @@ title: server-info
 
 ## 描述
 
-`server-info` 是一款能够定期将服务基本信息上报至 etcd 的插件。
+`server-info` 插件可以定期将服务基本信息上报至 etcd。
 
 服务信息中每一项的含义如下:
 
-| 名称             | 类型    | 描述                                                                                                                    |
+| 名称             | 类型    | 描述                                                                                                                   |
 | ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
-| boot_time        | integer | APISIX 服务实例的启动时间(UNIX 时间戳),如果对 APISIX 进行热更新操作,该值将被重置;普通的 reload 操作不会影响该值。               |
-| id               | string  | APISIX 服务实例 id 。                                                                                                   |
-| etcd_version     | string  | etcd 集群的版本信息,如果 APISIX 和 etcd 集群之间存在网络分区,该值将设置为 `"unknown"`。                                       |
+| boot_time        | integer | APISIX 服务实例的启动时间(UNIX 时间戳),如果对 APISIX 进行热更新操作,该值将被重置。普通的 reload 操作不会影响该值。         |
+| id               | string  | APISIX 服务实例 id。                                                                                                   |
+| etcd_version     | string  | etcd 集群的版本信息,如果 APISIX 和 etcd 集群之间存在网络分区,该值将设置为 `"unknown"`。                                   |
 | version          | string  | APISIX 版本信息。                                                                                                       |
-| hostname         | string  | APISIX 所部署的机器或 pod 的主机名信息。                                                                                   |
+| hostname         | string  | 部署 APISIX 的主机或 Pod 的主机名信息。                                                                                  |

Review Comment:
   ```suggestion
   | hostname         | string  | 部署 APISIX 或 Pod 的主机名信息。                                                                                  |
   ```



-- 
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 #6886: docs: update "General" Plugins

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


##########
docs/zh/latest/plugins/redirect.md:
##########
@@ -23,29 +28,32 @@ title: redirect
 
 ## 描述
 
-URI 重定向插件。
+`redirect`  插件可用于配置 URI 重定向。

Review Comment:
   ```suggestion
   `redirect` 插件可用于配置 URI 重定向。
   ```



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