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/27 02:41:18 UTC

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

huang-x-h commented on a change in pull request #5116:
URL: https://github.com/apache/apisix/pull/5116#discussion_r716322298



##########
File path: docs/zh/latest/plugins/real-ip.md
##########
@@ -0,0 +1,102 @@
+---
+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.
+#
+-->
+
+## 目录
+
+- [**简介**](#简介)
+- [**属性**](#属性)
+- [**如何启用**](#如何启用)
+- [**测试插件**](#测试插件)
+- [**禁用插件**](#禁用插件)
+
+## 简介
+
+`real-ip` 插件用于动态改变传递到 `APISIX` 的客户端的 `IP` 和端口。
+
+它工作方式和 `Nginx` 里 `ngx_http_realip_module` 模块一样,并且更为灵活。
+
+**该插件依赖 `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` 指令 |
+

Review comment:
       fixed, review plz




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