This is an automated email from the ASF dual-hosted git repository. monkeydluffy 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 4f5ac5870 docs: fix chaitin-waf attributes in doc (#9940)
4f5ac5870 is described below
commit 4f5ac5870976a26983b9d511c635c51652c6f70f
Author: Sarasa Kisaragi <[email protected]>
AuthorDate: Tue Aug 1 16:11:35 2023 +0800
docs: fix chaitin-waf attributes in doc (#9940)
---
docs/en/latest/plugins/chaitin-waf.md | 46 ++++++++++++++++++-----------------
docs/zh/latest/plugins/chaitin-waf.md | 28 ++++++++++-----------
2 files changed, 38 insertions(+), 36 deletions(-)
diff --git a/docs/en/latest/plugins/chaitin-waf.md
b/docs/en/latest/plugins/chaitin-waf.md
index 620672840..14966c4ea 100644
--- a/docs/en/latest/plugins/chaitin-waf.md
+++ b/docs/en/latest/plugins/chaitin-waf.md
@@ -29,7 +29,8 @@ description: This document contains basic information about
the Apache APISIX `c
## Description
-After enabling the chaitin-waf plugin, the traffic will be forwarded to the
Chaitin WAF service for the detection and prevention of various web application
attacks, ensuring the security of the application and user data.
+After enabling the chaitin-waf plugin, the traffic will be forwarded to the
Chaitin WAF service for the detection and
+prevention of various web application attacks, ensuring the security of the
application and user data.
## Response Headers
@@ -54,18 +55,18 @@ The response headers are listed below:
## Plugin Metadata
-| Name | Type | Required | Default value
| Description
|
-|--------------------------|---------------|----------|-----------------------------|------------------------------------------------------------------------------------------------------------------------------|
-| nodes | array(object) | true |
| A list of addresses for the Chaitin SafeLine WAF service.
|
-| nodes[0].host | string | true |
| The address of Chaitin SafeLine WAF service. Supports IPV4, IPV6, Unix
Socket, etc. |
-| nodes[0].port | string | false | 80
| The port of Chaitin SafeLine WAF service.
|
-| config | object | false |
| Configuration of the Chaitin SafeLine WAF service. The parameters
configured here will be used when route is not configured. |
-| config.connect_timeout | integer | false | 1000
| connect timeout, in milliseconds
|
-| config.send_timeout | integer | false | 1000
| send timeout, in milliseconds
|
-| config.read_timeout | integer | false | 1000
| read timeout, in milliseconds
|
-| config.req_body_size | integer | false | 1024
| request body size, in KB
|
-| config.keepalive_size | integer | false | 256
| maximum concurrent idle connections to the SafeLine WAF detection
service |
-| config.keepalive_timeout | integer | false | 60000
| idle connection timeout, in milliseconds
|
+| Name | Type | Required | Default value |
Description
|
+|--------------------------|---------------|----------|---------------|------------------------------------------------------------------------------------------------------------------------------|
+| nodes | array(object) | true | | A list
of addresses for the Chaitin SafeLine WAF service.
|
+| nodes[0].host | string | true | | The
address of Chaitin SafeLine WAF service. Supports IPV4, IPV6, Unix Socket, etc.
|
+| nodes[0].port | string | false | 80 | The
port of Chaitin SafeLine WAF service.
|
+| config | object | false | |
Configuration of the Chaitin SafeLine WAF service. The parameters configured
here will be used when route is not configured. |
+| config.connect_timeout | integer | false | 1000 |
connect timeout, in milliseconds
|
+| config.send_timeout | integer | false | 1000 | send
timeout, in milliseconds
|
+| config.read_timeout | integer | false | 1000 | read
timeout, in milliseconds
|
+| config.req_body_size | integer | false | 1024 |
request body size, in KB
|
+| config.keepalive_size | integer | false | 256 |
maximum concurrent idle connections to the SafeLine WAF detection service
|
+| config.keepalive_timeout | integer | false | 60000 | idle
connection timeout, in milliseconds
|
An example configuration is as follows.
@@ -87,15 +88,15 @@ curl
http://127.0.0.1:9180/apisix/admin/plugin_metadata/chaitin-waf -H 'X-API-KE
|--------------------------|---------------|----------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| match | array[object] | false | | The
list of matching rules, default is empty
|
| match.vars | array[array] | false | | List
of variables to match for filtering requests for conditional traffic split. It
is in the format `{variable operator value}`. For example, `{"arg_name", "==",
"json"}`. The variables here are consistent with NGINX internal variables. For
details on supported operators,
[lua-resty-expr](https://github.com/api7/lua-resty-expr#operator-list). |
-| add_header | bool | false | true |
Whether to add response headers
|
-| add_debug_header | bool | false | false |
Whether or not to add debugging headers, effective when `add_header` is `true`.
|
+| append_waf_resp_header | bool | false | true |
Whether to add response headers
|
+| append_waf_debug_header | bool | false | false |
Whether or not to add debugging headers, effective when `add_header` is `true`.
|
| config | object | false | |
Configuration of the Chaitin SafeLine WAF service. When the route is not
configured, the parameters configured in the metadata are used.
|
-| config.connect_timeout | integer | false | |
connect timeout, in milliseconds
|
-| config.send_timeout | integer | false | | send
timeout, in milliseconds
|
-| config.read_timeout | integer | false | | read
timeout, in milliseconds
|
-| config.req_body_size | integer | false | |
request body size, in KB
|
-| config.keepalive_size | integer | false | |
maximum concurrent idle connections to the SafeLine WAF detection service
|
-| config.keepalive_timeout | integer | false | | idle
connection timeout, in milliseconds
|
+| config.connect_timeout | integer | false | |
connect timeout, in milliseconds
|
+| config.send_timeout | integer | false | | send
timeout, in milliseconds
|
+| config.read_timeout | integer | false | | read
timeout, in milliseconds
|
+| config.req_body_size | integer | false | |
request body size, in KB
|
+| config.keepalive_size | integer | false | |
maximum concurrent idle connections to the SafeLine WAF detection service
|
+| config.keepalive_timeout | integer | false | | idle
connection timeout, in milliseconds
|
A sample configuration is shown below, using `httpbun.org` as the example
backend, which can be replaced as needed:
@@ -237,7 +238,8 @@ Set-Cookie: sl-session=UdywdGL+uGS7q8xMfnJlbQ==; Domain=;
Path=/; Max-Age=86400
## Delete Plugin
-To remove the `chaitin-waf` plugin, you can delete the corresponding JSON
configuration from the Plugin configuration. APISIX will automatically reload
and you do not have to restart for this to take effect:
+To remove the `chaitin-waf` plugin, you can delete the corresponding JSON
configuration from the Plugin configuration.
+APISIX will automatically reload and you do not have to restart for this to
take effect:
```bash
$ curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
diff --git a/docs/zh/latest/plugins/chaitin-waf.md
b/docs/zh/latest/plugins/chaitin-waf.md
index 2657ed66c..8d8331caa 100644
--- a/docs/zh/latest/plugins/chaitin-waf.md
+++ b/docs/zh/latest/plugins/chaitin-waf.md
@@ -54,18 +54,18 @@ description: 本文介绍了关于 Apache APISIX `chaitin-waf` 插件的基本
## 插件元数据
-| 名称 | 类型 | 必选项 | 默认值
| 描述
|
-|--------------------------|---------------|-----|-----------------------------|-------------------------------------------------------------------------------------------------------------|
-| nodes | array(object) | 必选 |
| 长亭 WAF 的地址列表。
|
-| nodes[0].host | string | 必选 |
| 长亭 WAF 的地址,支持 IPV4、IPV6、Unix Socket 等配置方式。
|
-| nodes[0].port | string | 可选 | 80
| 长亭 WAF 的端口。
|
-| config | object | 否 |
| 长亭 WAF 服务的配置参数值。当路由没有配置时将使用这里所配置的参数。
|
-| config.connect_timeout | integer | 否 | 1000
| connect timeout, 毫秒
|
-| config.send_timeout | integer | 否 | 1000
| send timeout, 毫秒
|
-| config.read_timeout | integer | 否 | 1000
| read timeout, 毫秒
|
-| config.req_body_size | integer | 否 | 1024
| 请求体大小,单位为 KB
|
-| config.keepalive_size | integer | 否 | 256
| 长亭 WAF 服务的最大并发空闲连接数
|
-| config.keepalive_timeout | integer | 否 | 60000
| 空闲链接超时,毫秒
|
+| 名称 | 类型 | 必选项 | 默认值 | 描述
|
+|--------------------------|---------------|-----|-------|--------------------------------------------|
+| nodes | array(object) | 必选 | | 长亭 WAF 的地址列表。
|
+| nodes[0].host | string | 必选 | | 长亭 WAF 的地址,支持
IPV4、IPV6、Unix Socket 等配置方式。 |
+| nodes[0].port | string | 可选 | 80 | 长亭 WAF 的端口。
|
+| config | object | 否 | | 长亭 WAF
服务的配置参数值。当路由没有配置时将使用这里所配置的参数。 |
+| config.connect_timeout | integer | 否 | 1000 | connect timeout, 毫秒
|
+| config.send_timeout | integer | 否 | 1000 | send timeout, 毫秒
|
+| config.read_timeout | integer | 否 | 1000 | read timeout, 毫秒
|
+| config.req_body_size | integer | 否 | 1024 | 请求体大小,单位为 KB
|
+| config.keepalive_size | integer | 否 | 256 | 长亭 WAF 服务的最大并发空闲连接数
|
+| config.keepalive_timeout | integer | 否 | 60000 | 空闲链接超时,毫秒
|
一个典型的示例配置如下:
@@ -87,8 +87,8 @@ curl
http://127.0.0.1:9180/apisix/admin/plugin_metadata/chaitin-waf -H 'X-API-KE
|--------------------------|---------------|-----|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| match | array[object] | 否 | |
匹配规则列表,默认为空且规则将被无条件执行。
|
| match.vars | array[array] | 否 | | 由一个或多个 `{var,
operator, val}` 元素组成的列表,例如:`{"arg_name", "==", "json"}`,表示当前请求参数 `name` 是
`json`。这里的 `var` 与 NGINX 内部自身变量命名是保持一致,所以也可以使用 `request_uri`、`host`
等;对于已支持的运算符,具体用法请参考
[lua-resty-expr](https://github.com/api7/lua-resty-expr#operator-list) 的
`operator-list` 部分。 |
-| add_header | bool | 否 | true | 是否添加响应头
|
-| add_debug_header | bool | 否 | false |
是否添加调试用响应头,`add_header` 为 `true` 时才生效
|
+| append_waf_resp_header | bool | 否 | true | 是否添加响应头
|
+| append_waf_debug_header | bool | 否 | false |
是否添加调试用响应头,`add_header` 为 `true` 时才生效
|
| config | object | 否 | | 长亭 WAF
服务的配置参数值。当路由没有配置时将使用元数据里所配置的参数。
|
| config.connect_timeout | integer | 否 | | connect timeout, 毫秒
|
| config.send_timeout | integer | 否 | | send timeout, 毫秒
|
