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 2021/09/23 01:07:46 UTC

[GitHub] [apisix] tokers commented on a change in pull request #5116: docs: add gzip and real-ip zh docs

tokers commented on a change in pull request #5116:
URL: https://github.com/apache/apisix/pull/5116#discussion_r714409615



##########
File path: docs/zh/latest/plugins/gzip.md
##########
@@ -0,0 +1,108 @@
+---
+title: gzip
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 目录
+
+- [**简介**](#简介)
+- [**属性**](#属性)
+- [**如何启用**](#如何启用)
+- [**测试插件**](#测试插件)
+- [**禁用插件**](#禁用插件)
+
+## 简介
+
+`gzip` 插件能动态设置 `Nginx` 的压缩行为。
+
+**该插件依赖 `APISIX` 运行在 [APISIX-OpenResty](../how-to-build.md#步骤6:为-apache-apisix-构建-openresty) 上。**
+
+## 属性
+
+| 名称           | 类型                 | 必选项 | 默认值        | 有效值                                                                      | 描述                                                                                                                                         |
+| --------------------------------------| ------------| -------------- | -------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
+| types          | array[string] or "*" | 可选    |  ["text/html"] |          | 动态设置 `gzip_types` 指令,特殊值 `"*"` 匹配任何 MIME 类型 |
+| min_length     | integer              | 可选    |  20            | >= 1     | 动态设置 `gzip_min_length` 指令 |
+| comp_level     | integer              | 可选    |  1             | [1, 9]   | 动态设置 `gzip_comp_level` 指令 |
+| http_version   | number               | 可选    |  1.1           | 1.1, 1.0 | 动态设置 `gzip_http_version` 指令 |
+| buffers.number | integer              | 可选    |  32            | >= 1     | 动态设置 `gzip_buffers` 指令 |
+| buffers.size   | integer              | 可选    |  4096          | >= 1     | 动态设置 `gzip_buffers` 指令 |
+| vary | boolean                        | 可选    |  false         |          | 动态设置 `gzip_vary` 指令 |

Review comment:
       Should we add a link for the `ngx_http_gzip_module` so that people can get the corresponding meaning of each directive.

##########
File path: docs/zh/latest/plugins/real-ip.md
##########
@@ -0,0 +1,103 @@
+---
+title: real-ip
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 目录
+
+- [**简介**](#简介)
+- [**属性**](#属性)
+- [**如何启用**](#如何启用)
+- [**测试插件**](#测试插件)
+- [**禁用插件**](#禁用插件)
+
+## 简介
+
+The `real-ip` 可以动态改变客户端的 `IP` 和端口。

Review comment:
       ```suggestion
   `real-ip` 插件用于动态改变客户端的 `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