This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/apisix-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new c7699da Deploy to GitHub pages
c7699da is described below
commit c7699dafa57918c466ce54d4c45ee9e76a6df3ea
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Dec 19 09:06:08 2020 +0000
Deploy to GitHub pages
---
apisix/admin-api.html | 43 ++++-------------------------
apisix/admin-api/index.html | 43 ++++-------------------------
apisix/architecture-design.html | 4 ++-
apisix/architecture-design/index.html | 4 ++-
apisix/zh-cn/admin-api.html | 43 ++++-------------------------
apisix/zh-cn/admin-api/index.html | 43 ++++-------------------------
apisix/zh-cn/architecture-design.html | 2 ++
apisix/zh-cn/architecture-design/index.html | 2 ++
8 files changed, 30 insertions(+), 154 deletions(-)
diff --git a/apisix/admin-api.html b/apisix/admin-api.html
index f6b3fbb..d6bff6e 100644
--- a/apisix/admin-api.html
+++ b/apisix/admin-api.html
@@ -79,7 +79,7 @@
<tr><td>remote_addrs</td><td>False, can't be used with
<code>remote_addr</code></td><td>Match Rules</td><td>The
<code>remote_addr</code> in the form of a non-empty list indicates that
multiple different IP addresses are allowed, and match any one of
them.</td><td>{"127.0.0.1", "192.0.0.0/8",
"::1"}</td></tr>
<tr><td>methods</td><td>False</td><td>Match Rules</td><td>If empty or without
this option, there are no <code>method</code> restrictions, and it can be a
combination of one or more:
<code>GET</code>,<code>POST</code>,<code>PUT</code>,<code>DELETE</code>,<code>PATCH</code>,
<code>HEAD</code>,<code>OPTIONS</code>,<code>CONNECT</code>,<code>TRACE</code>.</td><td>{"GET",
"POST"}</td></tr>
<tr><td>priority</td><td>False</td><td>Match Rules</td><td>If different routes
contain the same <code>uri</code>, determine which route is matched first based
on the attribute<code>priority</code>. Larger value means higher priority. The
default value is 0.</td><td>priority = 10</td></tr>
-<tr><td>vars</td><td>False</td><td>Match Rules</td><td>A list of one or more
<code>{var, operator, val}</code> elements, like this: <code>{{var, operator,
val}, {var, operator, val}, ...}}</code>. For example:
<code>{"arg_name", "==", "json"}</code> means
that the current request parameter <code>name</code> is <code>json</code>. The
<code>var</code> here is consistent with the internal variable name of Nginx,
so you can also use <code>request_uri</code>, <co [...]
+<tr><td>vars</td><td>False</td><td>Match Rules</td><td>A list of one or more
<code>{var, operator, val}</code> elements, like this: <code>{{var, operator,
val}, {var, operator, val}, ...}}</code>. For example:
<code>{"arg_name", "==", "json"}</code> means
that the current request parameter <code>name</code> is <code>json</code>. The
<code>var</code> here is consistent with the internal variable name of Nginx,
so you can also use <code>request_uri</code>, <co [...]
<tr><td>filter_func</td><td>False</td><td>Match Rules</td><td>User-defined
filtering function. You can use it to achieve matching requirements for special
scenarios. This function accepts an input parameter named <code>vars</code> by
default, which you can use to get Nginx variables.</td><td>function(vars)
return vars["arg_name"] == "json" end</td></tr>
<tr><td>plugins</td><td>False</td><td>Plugin</td><td>See <a
href="/apisix/architecture-design#plugin">Plugin</a> for more</td><td></td></tr>
<tr><td>script</td><td>False</td><td>Script</td><td>See <a
href="/apisix/architecture-design#script">Script</a> for more</td><td></td></tr>
@@ -98,17 +98,14 @@
<p>Config Example:</p>
<pre><code class="hljs css language-shell">{
"id": "1", # id, unnecessary.
- "uri": "/release/a", # uri
- "uris": ["/a","/b"], # A set of uri, URL and uris need only have a
non-empty one.
+ "uris": ["/a","/b"], # A set of uri.
"methods": ["GET","POST"], # Can fill multiple methods
- "host": "aa.com", # host
- "hosts": ["a.com","b.com"], # A set of host. Host and hosts only need to
be non-empty one.
+ "hosts": ["a.com","b.com"], # A set of host.
"plugins": {}, # Bound plugin
"priority": 0, # If different routes contain the same `uri`,
determine which route is matched first based on the attribute` priority`, the
default value is 0.
"name": "route-xxx",
"desc": "hello world",
- "remote_addr": "127.0.0.1", # Client IP
- "remote_addrs": ["127.0.0.1"], # A set of Client IP. Remote_addr and
remo-te_addrs only need to be non-empty one.
+ "remote_addrs": ["127.0.0.1"], # A set of Client IP.
"vars": [], # A list of one or more `{var, operator, val}`
elements
"upstream_id": "1", # upstream id, recommended
"upstream": {}, # upstream, not recommended
@@ -276,36 +273,6 @@ After successful execution, status nodes will be updated
to:
<p>Response Parameters</p>
</blockquote>
<p>Return response from etcd currently.</p>
-<h3><a class="anchor" aria-hidden="true" id="available-operators"></a><a
href="#available-operators" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.2 [...]
-<table>
-<thead>
-<tr><th>Operator</th><th>Description</th><th>Example</th></tr>
-</thead>
-<tbody>
-<tr><td>==</td><td>Equal</td><td>{"arg_name", "==",
"json"}</td></tr>
-<tr><td>~=</td><td>Not Equal</td><td>{"arg_name", "~=",
"json"}</td></tr>
-<tr><td>></td><td>Greater Than</td><td>{"arg_age",
">", 24}</td></tr>
-<tr><td><</td><td>Less Than</td><td>{"arg_age", "<",
24}</td></tr>
-<tr><td>~~</td><td>Regex</td><td>{"arg_name", "~~",
"[a-z]+"}</td></tr>
-</tbody>
-</table>
-<p>Consider the following example: matching requests whose <code>request
name</code> is equal to <code>json</code>, <code>age</code> is greater than
<code>18</code>, and <code>address</code> begins with <code>China</code>:</p>
-<pre><code class="hljs css language-shell">curl
http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
-{
- "uri": "/index.html",
- "vars": [
- ["arg_name", "==", "json"],
- ["arg_age", ">", "18"],
- ["arg_address", "~~", "China.*"]
- ],
- "upstream": {
- "type": "roundrobin",
- "nodes": {
- "39.97.63.215:80": 1
- }
- }
-}'
-</code></pre>
<p><a href="#Table-of-Contents">Back to TOC</a></p>
<h2><a class="anchor" aria-hidden="true" id="service"></a><a href="#service"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1- [...]
<p><em>API</em>:/apisix/admin/services/{id}</p>
@@ -752,7 +719,7 @@ Date: Thu, 26 Dec 2019 04:19:34 GMT
Content-Type: text/plain
</code></pre>
<p><a href="#Table-of-Contents">Back to TOC</a></p>
-</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#route">Route</a><ul
class="toc-headings"><li><a href="#available-operators">Available
Operators</a></li></ul></li><li><a href="#service">Service</a></li><li><a
href="#consumer">Consumer</a></li><li><a
href="#upstream">Upstream</a></li><li><a href="#ssl">SSL</a></li><li><a
href="#plugin-metadata">Plugin Metadata</a></li></ul></nav></div><footer
class="nav [...]
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#route">Route</a></li><li><a href="#service">Service</a></li><li><a
href="#consumer">Consumer</a></li><li><a
href="#upstream">Upstream</a></li><li><a href="#ssl">SSL</a></li><li><a
href="#plugin-metadata">Plugin Metadata</a></li></ul></nav></div><footer
class="nav-footer" id="footer"><section class="sitemap"><a href="/"
class="nav-home"></a><div><h5>ASF</ [...]
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
diff --git a/apisix/admin-api/index.html b/apisix/admin-api/index.html
index f6b3fbb..d6bff6e 100644
--- a/apisix/admin-api/index.html
+++ b/apisix/admin-api/index.html
@@ -79,7 +79,7 @@
<tr><td>remote_addrs</td><td>False, can't be used with
<code>remote_addr</code></td><td>Match Rules</td><td>The
<code>remote_addr</code> in the form of a non-empty list indicates that
multiple different IP addresses are allowed, and match any one of
them.</td><td>{"127.0.0.1", "192.0.0.0/8",
"::1"}</td></tr>
<tr><td>methods</td><td>False</td><td>Match Rules</td><td>If empty or without
this option, there are no <code>method</code> restrictions, and it can be a
combination of one or more:
<code>GET</code>,<code>POST</code>,<code>PUT</code>,<code>DELETE</code>,<code>PATCH</code>,
<code>HEAD</code>,<code>OPTIONS</code>,<code>CONNECT</code>,<code>TRACE</code>.</td><td>{"GET",
"POST"}</td></tr>
<tr><td>priority</td><td>False</td><td>Match Rules</td><td>If different routes
contain the same <code>uri</code>, determine which route is matched first based
on the attribute<code>priority</code>. Larger value means higher priority. The
default value is 0.</td><td>priority = 10</td></tr>
-<tr><td>vars</td><td>False</td><td>Match Rules</td><td>A list of one or more
<code>{var, operator, val}</code> elements, like this: <code>{{var, operator,
val}, {var, operator, val}, ...}}</code>. For example:
<code>{"arg_name", "==", "json"}</code> means
that the current request parameter <code>name</code> is <code>json</code>. The
<code>var</code> here is consistent with the internal variable name of Nginx,
so you can also use <code>request_uri</code>, <co [...]
+<tr><td>vars</td><td>False</td><td>Match Rules</td><td>A list of one or more
<code>{var, operator, val}</code> elements, like this: <code>{{var, operator,
val}, {var, operator, val}, ...}}</code>. For example:
<code>{"arg_name", "==", "json"}</code> means
that the current request parameter <code>name</code> is <code>json</code>. The
<code>var</code> here is consistent with the internal variable name of Nginx,
so you can also use <code>request_uri</code>, <co [...]
<tr><td>filter_func</td><td>False</td><td>Match Rules</td><td>User-defined
filtering function. You can use it to achieve matching requirements for special
scenarios. This function accepts an input parameter named <code>vars</code> by
default, which you can use to get Nginx variables.</td><td>function(vars)
return vars["arg_name"] == "json" end</td></tr>
<tr><td>plugins</td><td>False</td><td>Plugin</td><td>See <a
href="/apisix/architecture-design#plugin">Plugin</a> for more</td><td></td></tr>
<tr><td>script</td><td>False</td><td>Script</td><td>See <a
href="/apisix/architecture-design#script">Script</a> for more</td><td></td></tr>
@@ -98,17 +98,14 @@
<p>Config Example:</p>
<pre><code class="hljs css language-shell">{
"id": "1", # id, unnecessary.
- "uri": "/release/a", # uri
- "uris": ["/a","/b"], # A set of uri, URL and uris need only have a
non-empty one.
+ "uris": ["/a","/b"], # A set of uri.
"methods": ["GET","POST"], # Can fill multiple methods
- "host": "aa.com", # host
- "hosts": ["a.com","b.com"], # A set of host. Host and hosts only need to
be non-empty one.
+ "hosts": ["a.com","b.com"], # A set of host.
"plugins": {}, # Bound plugin
"priority": 0, # If different routes contain the same `uri`,
determine which route is matched first based on the attribute` priority`, the
default value is 0.
"name": "route-xxx",
"desc": "hello world",
- "remote_addr": "127.0.0.1", # Client IP
- "remote_addrs": ["127.0.0.1"], # A set of Client IP. Remote_addr and
remo-te_addrs only need to be non-empty one.
+ "remote_addrs": ["127.0.0.1"], # A set of Client IP.
"vars": [], # A list of one or more `{var, operator, val}`
elements
"upstream_id": "1", # upstream id, recommended
"upstream": {}, # upstream, not recommended
@@ -276,36 +273,6 @@ After successful execution, status nodes will be updated
to:
<p>Response Parameters</p>
</blockquote>
<p>Return response from etcd currently.</p>
-<h3><a class="anchor" aria-hidden="true" id="available-operators"></a><a
href="#available-operators" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.2 [...]
-<table>
-<thead>
-<tr><th>Operator</th><th>Description</th><th>Example</th></tr>
-</thead>
-<tbody>
-<tr><td>==</td><td>Equal</td><td>{"arg_name", "==",
"json"}</td></tr>
-<tr><td>~=</td><td>Not Equal</td><td>{"arg_name", "~=",
"json"}</td></tr>
-<tr><td>></td><td>Greater Than</td><td>{"arg_age",
">", 24}</td></tr>
-<tr><td><</td><td>Less Than</td><td>{"arg_age", "<",
24}</td></tr>
-<tr><td>~~</td><td>Regex</td><td>{"arg_name", "~~",
"[a-z]+"}</td></tr>
-</tbody>
-</table>
-<p>Consider the following example: matching requests whose <code>request
name</code> is equal to <code>json</code>, <code>age</code> is greater than
<code>18</code>, and <code>address</code> begins with <code>China</code>:</p>
-<pre><code class="hljs css language-shell">curl
http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
-{
- "uri": "/index.html",
- "vars": [
- ["arg_name", "==", "json"],
- ["arg_age", ">", "18"],
- ["arg_address", "~~", "China.*"]
- ],
- "upstream": {
- "type": "roundrobin",
- "nodes": {
- "39.97.63.215:80": 1
- }
- }
-}'
-</code></pre>
<p><a href="#Table-of-Contents">Back to TOC</a></p>
<h2><a class="anchor" aria-hidden="true" id="service"></a><a href="#service"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1- [...]
<p><em>API</em>:/apisix/admin/services/{id}</p>
@@ -752,7 +719,7 @@ Date: Thu, 26 Dec 2019 04:19:34 GMT
Content-Type: text/plain
</code></pre>
<p><a href="#Table-of-Contents">Back to TOC</a></p>
-</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#route">Route</a><ul
class="toc-headings"><li><a href="#available-operators">Available
Operators</a></li></ul></li><li><a href="#service">Service</a></li><li><a
href="#consumer">Consumer</a></li><li><a
href="#upstream">Upstream</a></li><li><a href="#ssl">SSL</a></li><li><a
href="#plugin-metadata">Plugin Metadata</a></li></ul></nav></div><footer
class="nav [...]
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#route">Route</a></li><li><a href="#service">Service</a></li><li><a
href="#consumer">Consumer</a></li><li><a
href="#upstream">Upstream</a></li><li><a href="#ssl">SSL</a></li><li><a
href="#plugin-metadata">Plugin Metadata</a></li></ul></nav></div><footer
class="nav-footer" id="footer"><section class="sitemap"><a href="/"
class="nav-home"></a><div><h5>ASF</ [...]
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
diff --git a/apisix/architecture-design.html b/apisix/architecture-design.html
index 8d77cd6..de00aa4 100644
--- a/apisix/architecture-design.html
+++ b/apisix/architecture-design.html
@@ -532,8 +532,10 @@ Server: openresty
hello world
</code></pre>
+<p>If the information can be delivered via HTTP response header, for example,
the plugin is in stream
+subsystem, the information will be logged in the error log with
<code>warn</code> level.</p>
<h3><a class="anchor" aria-hidden="true" id="advanced-debug-mode"></a><a
href="#advanced-debug-mode" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.2 [...]
-<p>Enable advanced debug mode by modifying the configuration in
<code>conf/debug.yaml</code> file. Because there will have a check every
second, only the checker reads the <code>#END</code> flag, and the file would
consider as closed.</p>
+<p>Enable advanced debug mode by modifying the configuration in
<code>conf/debug.yaml</code> file. Because there will be a check every second,
only the checker reads the <code>#END</code> flag, and the file would be
considered as closed.</p>
<p>The checker would judge whether the file data changed according to the last
modification time of the file. If there has any change, reload it. If there was
no change, skip this check. So it's hot reload for enabling or disabling
advanced debug mode.</p>
<table>
<thead>
diff --git a/apisix/architecture-design/index.html
b/apisix/architecture-design/index.html
index 8d77cd6..de00aa4 100644
--- a/apisix/architecture-design/index.html
+++ b/apisix/architecture-design/index.html
@@ -532,8 +532,10 @@ Server: openresty
hello world
</code></pre>
+<p>If the information can be delivered via HTTP response header, for example,
the plugin is in stream
+subsystem, the information will be logged in the error log with
<code>warn</code> level.</p>
<h3><a class="anchor" aria-hidden="true" id="advanced-debug-mode"></a><a
href="#advanced-debug-mode" aria-hidden="true" class="hash-link"><svg
class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0
0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5
0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4
9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.2 [...]
-<p>Enable advanced debug mode by modifying the configuration in
<code>conf/debug.yaml</code> file. Because there will have a check every
second, only the checker reads the <code>#END</code> flag, and the file would
consider as closed.</p>
+<p>Enable advanced debug mode by modifying the configuration in
<code>conf/debug.yaml</code> file. Because there will be a check every second,
only the checker reads the <code>#END</code> flag, and the file would be
considered as closed.</p>
<p>The checker would judge whether the file data changed according to the last
modification time of the file. If there has any change, reload it. If there was
no change, skip this check. So it's hot reload for enabling or disabling
advanced debug mode.</p>
<table>
<thead>
diff --git a/apisix/zh-cn/admin-api.html b/apisix/zh-cn/admin-api.html
index a41230c..2212cea 100644
--- a/apisix/zh-cn/admin-api.html
+++ b/apisix/zh-cn/admin-api.html
@@ -86,7 +86,7 @@
<tr><td>remote_addrs</td><td>可选</td><td>匹配规则</td><td>非空列表形态的
<code>remote_addr</code>,表示允许有多个不同 IP
地址,符合其中任意一个即可。</td><td>{"127.0.0.1", "192.0.0.0/8",
"::1"}</td></tr>
<tr><td>methods</td><td>可选</td><td>匹配规则</td><td>如果为空或没有该选项,代表没有任何
<code>method</code> 限制,也可以是一个或多个的组合:<code>GET</code>, <code>POST</code>,
<code>PUT</code>, <code>DELETE</code>, <code>PATCH</code>, <code>HEAD</code>,
<code>OPTIONS</code>,<code>CONNECT</code>,<code>TRACE</code>。</td><td>{"GET",
"POST"}</td></tr>
<tr><td>priority</td><td>可选</td><td>匹配规则</td><td>如果不同路由包含相同
<code>uri</code>,根据属性 <code>priority</code> 确定哪个 <code>route</code>
被优先匹配,值越大优先级越高,默认值为 0。</td><td>priority = 10</td></tr>
-<tr><td>vars</td><td>可选</td><td>匹配规则</td><td>由一个或多个<code>{var, operator,
val}</code>元素组成的列表,类似这样:<code>{{var, operator, val}, {var, operator, val},
...}}</code>。例如:<code>{"arg_name", "==",
"json"}</code>,表示当前请求参数 <code>name</code> 是 <code>json</code>。这里的
<code>var</code> 与 Nginx 内部自身变量命名是保持一致,所以也可以使用
<code>request_uri</code>、<code>host</code> 等;对于 <code>operator</code>
部分,目前已支持的运算符有
<code>==</code>、<code>~=</code>、<code>></code>、<code><</code> 和 <code>
[...]
+<tr><td>vars</td><td>可选</td><td>匹配规则</td><td>由一个或多个<code>{var, operator,
val}</code>元素组成的列表,类似这样:<code>{{var, operator, val}, {var, operator, val},
...}}</code>。例如:<code>{"arg_name", "==",
"json"}</code>,表示当前请求参数 <code>name</code> 是 <code>json</code>。这里的
<code>var</code> 与 Nginx 内部自身变量命名是保持一致,所以也可以使用
<code>request_uri</code>、<code>host</code> 等。更多细节请参考<a
href="https://github.com/api7/lua-resty-expr">lua-resty-expr</a></td><td>{{"arg_name",
"== [...]
<tr><td>filter_func</td><td>可选</td><td>匹配规则</td><td>用户自定义的过滤函数。可以使用它来实现特殊场景的匹配要求实现。该函数默认接受一个名为
vars 的输入参数,可以用它来获取 Nginx 变量。</td><td>function(vars) return
vars["arg_name"] == "json" end</td></tr>
<tr><td>labels</td><td>可选</td><td>匹配规则</td><td>标识附加属性的键值对</td><td>{"version":"v2","build":"16","env":"production"}</td></tr>
<tr><td>enable_websocket</td><td>可选</td><td>辅助</td><td>是否启用
<code>websocket</code>(boolean), 缺省 <code>false</code>.</td><td></td></tr>
@@ -103,17 +103,14 @@
<p>route 对象 json 配置内容:</p>
<pre><code class="hljs css language-shell">{
"id": "1", # id,非必填
- "uri": "/release/a", # URL 路径
- "uris": ["/a","/b"], # 一组 URL 路径, URL 与 uris 只需要有一个非空即可
+ "uris": ["/a","/b"], # 一组 URL 路径
"methods": ["GET","POST"], # 可以填多个方法
- "host": "aa.com", # host 域名
- "hosts": ["a.com","b.com"], # 一组 host 域名, host 与 hosts 只需要有一个非空即可
+ "hosts": ["a.com","b.com"], # 一组 host 域名
"plugins": {}, # 指定 route 绑定的插件
"priority": 0, # apisix
支持多种匹配方式,可能会在一次匹配中同时匹配到多条路由,此时优先级高的优先匹配中
"name": "路由xxx",
"desc": "hello world",
- "remote_addr": "127.0.0.1", # 客户端请求 IP 地址
- "remote_addrs": ["127.0.0.1"], # 一组客户端请求 IP 地址, remote_addr 与
remote_addrs 只需要有一个非空即可
+ "remote_addrs": ["127.0.0.1"], # 一组客户端请求 IP 地址
"vars": [], # 由一个或多个 {var, operator, val} 元素组成的列表
"upstream_id": "1", # upstream 对象在 etcd 中的 id ,建议使用此值
"upstream": {}, # upstream 信息对象,建议尽量不要使用
@@ -281,36 +278,6 @@ HTTP/1.1 200 OK
<p>应答参数</p>
</blockquote>
<p>目前是直接返回与 etcd 交互后的结果。</p>
-<h3><a class="anchor" aria-hidden="true" id="运算符列表"></a><a href="#运算符列表"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09 [...]
-<table>
-<thead>
-<tr><th>运算符</th><th>描述</th><th>例子</th></tr>
-</thead>
-<tbody>
-<tr><td>==</td><td>相等</td><td>{"arg_name", "==",
"json"}</td></tr>
-<tr><td>~=</td><td>不等于</td><td>{"arg_name", "~=",
"json"}</td></tr>
-<tr><td>></td><td>大于</td><td>{"arg_age", ">",
24}</td></tr>
-<tr><td><</td><td>小于</td><td>{"arg_age", "<",
24}</td></tr>
-<tr><td>~~</td><td>正则匹配</td><td>{"arg_name", "~~",
"[a-z]+"}</td></tr>
-</tbody>
-</table>
-<p>请看下面例子,匹配请求参数 name 等于 json ,age 大于 18 且 address 开头是 China 的请求:</p>
-<pre><code class="hljs css language-shell">curl
http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
-{
- "uri": "/index.html",
- "vars": [
- ["arg_name", "==", "json"],
- ["arg_age", ">", "18"],
- ["arg_address", "~~", "^China.*"]
- ],
- "upstream": {
- "type": "roundrobin",
- "nodes": {
- "39.97.63.215:80": 1
- }
- }
-}'
-</code></pre>
<p><a href="#目录">Back to TOC</a></p>
<h2><a class="anchor" aria-hidden="true" id="service"></a><a href="#service"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1- [...]
<p><em>地址</em>:/apisix/admin/services/{id}</p>
@@ -761,7 +728,7 @@ Date: Thu, 26 Dec 2019 04:19:34 GMT
Content-Type: text/plain
</code></pre>
<p><a href="#目录">Back to TOC</a></p>
-</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#route">Route</a><ul
class="toc-headings"><li><a href="#运算符列表">运算符列表</a></li></ul></li><li><a
href="#service">Service</a></li><li><a href="#consumer">Consumer</a></li><li><a
href="#upstream">Upstream</a></li><li><a href="#ssl">SSL</a></li><li><a
href="#plugin-metadata">Plugin Metadata</a></li></ul></nav></div><footer
class="nav-footer" id="footer"><sectio [...]
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#route">Route</a></li><li><a href="#service">Service</a></li><li><a
href="#consumer">Consumer</a></li><li><a
href="#upstream">Upstream</a></li><li><a href="#ssl">SSL</a></li><li><a
href="#plugin-metadata">Plugin Metadata</a></li></ul></nav></div><footer
class="nav-footer" id="footer"><section class="sitemap"><a href="/"
class="nav-home"></a><div><h5>ASF</ [...]
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
diff --git a/apisix/zh-cn/admin-api/index.html
b/apisix/zh-cn/admin-api/index.html
index a41230c..2212cea 100644
--- a/apisix/zh-cn/admin-api/index.html
+++ b/apisix/zh-cn/admin-api/index.html
@@ -86,7 +86,7 @@
<tr><td>remote_addrs</td><td>可选</td><td>匹配规则</td><td>非空列表形态的
<code>remote_addr</code>,表示允许有多个不同 IP
地址,符合其中任意一个即可。</td><td>{"127.0.0.1", "192.0.0.0/8",
"::1"}</td></tr>
<tr><td>methods</td><td>可选</td><td>匹配规则</td><td>如果为空或没有该选项,代表没有任何
<code>method</code> 限制,也可以是一个或多个的组合:<code>GET</code>, <code>POST</code>,
<code>PUT</code>, <code>DELETE</code>, <code>PATCH</code>, <code>HEAD</code>,
<code>OPTIONS</code>,<code>CONNECT</code>,<code>TRACE</code>。</td><td>{"GET",
"POST"}</td></tr>
<tr><td>priority</td><td>可选</td><td>匹配规则</td><td>如果不同路由包含相同
<code>uri</code>,根据属性 <code>priority</code> 确定哪个 <code>route</code>
被优先匹配,值越大优先级越高,默认值为 0。</td><td>priority = 10</td></tr>
-<tr><td>vars</td><td>可选</td><td>匹配规则</td><td>由一个或多个<code>{var, operator,
val}</code>元素组成的列表,类似这样:<code>{{var, operator, val}, {var, operator, val},
...}}</code>。例如:<code>{"arg_name", "==",
"json"}</code>,表示当前请求参数 <code>name</code> 是 <code>json</code>。这里的
<code>var</code> 与 Nginx 内部自身变量命名是保持一致,所以也可以使用
<code>request_uri</code>、<code>host</code> 等;对于 <code>operator</code>
部分,目前已支持的运算符有
<code>==</code>、<code>~=</code>、<code>></code>、<code><</code> 和 <code>
[...]
+<tr><td>vars</td><td>可选</td><td>匹配规则</td><td>由一个或多个<code>{var, operator,
val}</code>元素组成的列表,类似这样:<code>{{var, operator, val}, {var, operator, val},
...}}</code>。例如:<code>{"arg_name", "==",
"json"}</code>,表示当前请求参数 <code>name</code> 是 <code>json</code>。这里的
<code>var</code> 与 Nginx 内部自身变量命名是保持一致,所以也可以使用
<code>request_uri</code>、<code>host</code> 等。更多细节请参考<a
href="https://github.com/api7/lua-resty-expr">lua-resty-expr</a></td><td>{{"arg_name",
"== [...]
<tr><td>filter_func</td><td>可选</td><td>匹配规则</td><td>用户自定义的过滤函数。可以使用它来实现特殊场景的匹配要求实现。该函数默认接受一个名为
vars 的输入参数,可以用它来获取 Nginx 变量。</td><td>function(vars) return
vars["arg_name"] == "json" end</td></tr>
<tr><td>labels</td><td>可选</td><td>匹配规则</td><td>标识附加属性的键值对</td><td>{"version":"v2","build":"16","env":"production"}</td></tr>
<tr><td>enable_websocket</td><td>可选</td><td>辅助</td><td>是否启用
<code>websocket</code>(boolean), 缺省 <code>false</code>.</td><td></td></tr>
@@ -103,17 +103,14 @@
<p>route 对象 json 配置内容:</p>
<pre><code class="hljs css language-shell">{
"id": "1", # id,非必填
- "uri": "/release/a", # URL 路径
- "uris": ["/a","/b"], # 一组 URL 路径, URL 与 uris 只需要有一个非空即可
+ "uris": ["/a","/b"], # 一组 URL 路径
"methods": ["GET","POST"], # 可以填多个方法
- "host": "aa.com", # host 域名
- "hosts": ["a.com","b.com"], # 一组 host 域名, host 与 hosts 只需要有一个非空即可
+ "hosts": ["a.com","b.com"], # 一组 host 域名
"plugins": {}, # 指定 route 绑定的插件
"priority": 0, # apisix
支持多种匹配方式,可能会在一次匹配中同时匹配到多条路由,此时优先级高的优先匹配中
"name": "路由xxx",
"desc": "hello world",
- "remote_addr": "127.0.0.1", # 客户端请求 IP 地址
- "remote_addrs": ["127.0.0.1"], # 一组客户端请求 IP 地址, remote_addr 与
remote_addrs 只需要有一个非空即可
+ "remote_addrs": ["127.0.0.1"], # 一组客户端请求 IP 地址
"vars": [], # 由一个或多个 {var, operator, val} 元素组成的列表
"upstream_id": "1", # upstream 对象在 etcd 中的 id ,建议使用此值
"upstream": {}, # upstream 信息对象,建议尽量不要使用
@@ -281,36 +278,6 @@ HTTP/1.1 200 OK
<p>应答参数</p>
</blockquote>
<p>目前是直接返回与 etcd 交互后的结果。</p>
-<h3><a class="anchor" aria-hidden="true" id="运算符列表"></a><a href="#运算符列表"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09 [...]
-<table>
-<thead>
-<tr><th>运算符</th><th>描述</th><th>例子</th></tr>
-</thead>
-<tbody>
-<tr><td>==</td><td>相等</td><td>{"arg_name", "==",
"json"}</td></tr>
-<tr><td>~=</td><td>不等于</td><td>{"arg_name", "~=",
"json"}</td></tr>
-<tr><td>></td><td>大于</td><td>{"arg_age", ">",
24}</td></tr>
-<tr><td><</td><td>小于</td><td>{"arg_age", "<",
24}</td></tr>
-<tr><td>~~</td><td>正则匹配</td><td>{"arg_name", "~~",
"[a-z]+"}</td></tr>
-</tbody>
-</table>
-<p>请看下面例子,匹配请求参数 name 等于 json ,age 大于 18 且 address 开头是 China 的请求:</p>
-<pre><code class="hljs css language-shell">curl
http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
-{
- "uri": "/index.html",
- "vars": [
- ["arg_name", "==", "json"],
- ["arg_age", ">", "18"],
- ["arg_address", "~~", "^China.*"]
- ],
- "upstream": {
- "type": "roundrobin",
- "nodes": {
- "39.97.63.215:80": 1
- }
- }
-}'
-</code></pre>
<p><a href="#目录">Back to TOC</a></p>
<h2><a class="anchor" aria-hidden="true" id="service"></a><a href="#service"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1- [...]
<p><em>地址</em>:/apisix/admin/services/{id}</p>
@@ -761,7 +728,7 @@ Date: Thu, 26 Dec 2019 04:19:34 GMT
Content-Type: text/plain
</code></pre>
<p><a href="#目录">Back to TOC</a></p>
-</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a href="#route">Route</a><ul
class="toc-headings"><li><a href="#运算符列表">运算符列表</a></li></ul></li><li><a
href="#service">Service</a></li><li><a href="#consumer">Consumer</a></li><li><a
href="#upstream">Upstream</a></li><li><a href="#ssl">SSL</a></li><li><a
href="#plugin-metadata">Plugin Metadata</a></li></ul></nav></div><footer
class="nav-footer" id="footer"><sectio [...]
+</span></div></article></div><div class="docs-prevnext"></div></div></div><nav
class="onPageNav"><ul class="toc-headings"><li><a
href="#route">Route</a></li><li><a href="#service">Service</a></li><li><a
href="#consumer">Consumer</a></li><li><a
href="#upstream">Upstream</a></li><li><a href="#ssl">SSL</a></li><li><a
href="#plugin-metadata">Plugin Metadata</a></li></ul></nav></div><footer
class="nav-footer" id="footer"><section class="sitemap"><a href="/"
class="nav-home"></a><div><h5>ASF</ [...]
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
diff --git a/apisix/zh-cn/architecture-design.html
b/apisix/zh-cn/architecture-design.html
index 9c0f6e9..ebf6796 100644
--- a/apisix/zh-cn/architecture-design.html
+++ b/apisix/zh-cn/architecture-design.html
@@ -552,6 +552,8 @@ Server: openresty
hello world
</code></pre>
+<p>如果这个信息无法通过 HTTP 应答头传递,比如插件在 stream 子系统里面执行,
+那么这个信息会以 warn 等级日志写入到错误日志中。</p>
<h3><a class="anchor" aria-hidden="true" id="高级调试模式"></a><a href="#高级调试模式"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>设置 <code>conf/debug.yaml</code> 中的选项,开启高级调试模式。由于 APISIX 服务启动后是每秒定期检查该文件,
当可以正常读取到 <code>#END</code> 结尾时,才认为文件处于写完关闭状态。</p>
diff --git a/apisix/zh-cn/architecture-design/index.html
b/apisix/zh-cn/architecture-design/index.html
index 9c0f6e9..ebf6796 100644
--- a/apisix/zh-cn/architecture-design/index.html
+++ b/apisix/zh-cn/architecture-design/index.html
@@ -552,6 +552,8 @@ Server: openresty
hello world
</code></pre>
+<p>如果这个信息无法通过 HTTP 应答头传递,比如插件在 stream 子系统里面执行,
+那么这个信息会以 warn 等级日志写入到错误日志中。</p>
<h3><a class="anchor" aria-hidden="true" id="高级调试模式"></a><a href="#高级调试模式"
aria-hidden="true" class="hash-link"><svg class="hash-link-icon"
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16"
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
<p>设置 <code>conf/debug.yaml</code> 中的选项,开启高级调试模式。由于 APISIX 服务启动后是每秒定期检查该文件,
当可以正常读取到 <code>#END</code> 结尾时,才认为文件处于写完关闭状态。</p>