This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 3920160 docs: fix the bug of route's example json (#4816)
3920160 is described below
commit 3920160f98388c1d7afaaedd65c58436240f5a68
Author: Crazy_Coder <su...@gmail.com>
AuthorDate: Fri Aug 13 16:10:12 2021 +0800
docs: fix the bug of route's example json (#4816)
---
docs/en/latest/admin-api.md | 2 +-
docs/zh/latest/admin-api.md | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/en/latest/admin-api.md b/docs/en/latest/admin-api.md
index fb5cda4..1d4e2e5 100644
--- a/docs/en/latest/admin-api.md
+++ b/docs/en/latest/admin-api.md
@@ -83,7 +83,7 @@ Note: When the `Admin API` is enabled, it will occupy the API prefixed with `/ap
| remote_addrs | False, can't be used with `remote_addr` | Match Rules | The `remote_addr` in the form of a non-empty list indicates that multiple different IP addresses are allowed, and match any one of them. [...]
| methods | False | Match Rules | If empty or without this option, there are no `method` restrictions, and it can be a combination of one or more: `GET`,`POST`,`PUT`,`DELETE`,`PATCH`, `HEAD`,`OPTIONS`,`CONNECT`,`TRACE`. [...]
| priority | False | Match Rules | If different routes contain the same `uri`, determine which route is matched first based on the attribute `priority`. Larger value means higher priority. The default value is 0. [...]
-| vars | False | Match Rules | A list of one or more `{var, operator, val}` elements, like this: `[[var, operator, val], [var, operator, val], ...]]`. For example: `["arg_name", "==", "json"]` means that the current request parameter `name` is `json`. The `var` here is consistent with the internal variable name of Nginx, so you can also use `request_uri`, `host`, etc. For more details, see [lua-resty-expr](https://github.com/api7/lua-resty-e [...]
+| vars | False | Match Rules | A list of one or more `[var, operator, val]` elements, like this: `[[var, operator, val], [var, operator, val], ...]]`. For example: `["arg_name", "==", "json"]` means that the current request parameter `name` is `json`. The `var` here is consistent with the internal variable name of Nginx, so you can also use `request_uri`, `host`, etc. For more details, see [lua-resty-expr](https://github.com/api7/lua-resty-e [...]
| filter_func | False | Match Rules | User-defined filtering function. You can use it to achieve matching requirements for special scenarios. This function accepts an input parameter named `vars` by default, which you can use to get Nginx variables. [...]
| plugins | False | Plugin | See [Plugin](architecture-design/plugin.md) for more [...]
| script | False | Script | See [Script](architecture-design/script.md) for more [...]
diff --git a/docs/zh/latest/admin-api.md b/docs/zh/latest/admin-api.md
index 5c42057..6fdc37b 100644
--- a/docs/zh/latest/admin-api.md
+++ b/docs/zh/latest/admin-api.md
@@ -85,12 +85,12 @@ Admin API 是为 Apache APISIX 服务的一组 API,我们可以将参数传递
| name | 可选 | 辅助 | 标识路由名称 | route-xxxx |
| desc | 可选 | 辅助 | 标识描述、使用场景等。 | 路由 xxxx |
| host | 可选,不能与 `hosts` 一起使用 | 匹配规则 | 当前请求域名,比如 `foo.com`;也支持泛域名,比如 `*.foo.com`。 | "foo.com" |
-| hosts | 可选,不能与 `host` 一起使用 | 匹配规则 | 非空列表形态的 `host`,表示允许有多个不同 `host`,匹配其中任意一个即可。 | {"foo.com", "\*.bar.com"} |
+| hosts | 可选,不能与 `host` 一起使用 | 匹配规则 | 非空列表形态的 `host`,表示允许有多个不同 `host`,匹配其中任意一个即可。 | ["foo.com", "\*.bar.com"] |
| remote_addr | 可选,不能与 `remote_addrs` 一起使用 | 匹配规则 | 客户端请求 IP 地址: `192.168.1.101`、`192.168.1.102` 以及 CIDR 格式的支持 `192.168.1.0/24`。特别的,APISIX 也完整支持 IPv6 地址匹配:`::1`,`fe80::1`, `fe80::1/64` 等。 | "192.168.1.0/24" |
-| remote_addrs | 可选,不能与 `remote_addr` 一起使用 | 匹配规则 | 非空列表形态的 `remote_addr`,表示允许有多个不同 IP 地址,符合其中任意一个即可。 | {"127.0.0.1", "192.0.0.0/8", "::1"} |
-| methods | 可选 | 匹配规则 | 如果为空或没有该选项,代表没有任何 `method` 限制,也可以是一个或多个的组合:`GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`,`CONNECT`,`TRACE`。 | {"GET", "POST"} |
+| remote_addrs | 可选,不能与 `remote_addr` 一起使用 | 匹配规则 | 非空列表形态的 `remote_addr`,表示允许有多个不同 IP 地址,符合其中任意一个即可。 | ["127.0.0.1", "192.0.0.0/8", "::1"] |
+| methods | 可选 | 匹配规则 | 如果为空或没有该选项,代表没有任何 `method` 限制,也可以是一个或多个的组合:`GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`,`CONNECT`,`TRACE`。 | ["GET", "POST"] |
| priority | 可选 | 匹配规则 | 如果不同路由包含相同 `uri`,根据属性 `priority` 确定哪个 `route` 被优先匹配,值越大优先级越高,默认值为 0。 | priority = 10 |
-| vars | 可选 | 匹配规则 | 由一个或多个`{var, operator, val}`元素组成的列表,类似这样:`{{var, operator, val}, {var, operator, val}, ...}}`。例如:`{"arg_name", "==", "json"}`,表示当前请求参数 `name` 是 `json`。这里的 `var` 与 Nginx 内部自身变量命名是保持一致,所以也可以使用 `request_uri`、`host` 等。更多细节请参考[lua-resty-expr](https://github.com/api7/lua-resty-expr) | {{"arg_name", "==", "json"}, {"arg_age", ">", 18}} |
+| vars | 可选 | 匹配规则 | 由一个或多个`[var, operator, val]`元素组成的列表,类似这样:`[[var, operator, val], [var, operator, val], ...]]`。例如:`["arg_name", "==", "json"]`,表示当前请求参数 `name` 是 `json`。这里的 `var` 与 Nginx 内部自身变量命名是保持一致,所以也可以使用 `request_uri`、`host` 等。更多细节请参考[lua-resty-expr](https://github.com/api7/lua-resty-expr) | [["arg_name", "==", "json"], ["arg_age", ">", 18]] |
| filter_func | 可选 | 匹配规则 | 用户自定义的过滤函数。可以使用它来实现特殊场景的匹配要求实现。该函数默认接受一个名为 vars 的输入参数,可以用它来获取 Nginx 变量。 | function(vars) return vars["arg_name"] == "json" end |
| labels | 可选 | 匹配规则 | 标识附加属性的键值对 | {"version":"v2","build":"16","env":"production"} |
| timeout | 可选 | 辅助 | 为 route 设置 upstream 的连接、发送消息、接收消息的超时时间。这个配置将会覆盖在 upstream 中 配置的 [timeout](#upstream) 选项 | {"connect": 3, "send": 3, "read": 3} |