This is an automated email from the ASF dual-hosted git repository.
sylviasu 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 1aa45caf2 docs: Update hmac-auth.md (#7803)
1aa45caf2 is described below
commit 1aa45caf2fa59e5f7add70db0439eda20cf59eb8
Author: Flytiger <[email protected]>
AuthorDate: Mon Aug 29 09:19:15 2022 +0800
docs: Update hmac-auth.md (#7803)
* Update hmac-auth.md
---
docs/zh/latest/plugins/hmac-auth.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/zh/latest/plugins/hmac-auth.md
b/docs/zh/latest/plugins/hmac-auth.md
index 5c26173dd..9e248e0fa 100644
--- a/docs/zh/latest/plugins/hmac-auth.md
+++ b/docs/zh/latest/plugins/hmac-auth.md
@@ -43,7 +43,7 @@ description: 本文介绍了关于 Apache APISIX `hmac-auth` 插件的基本信
| clock_skew | integer | 否 | 0 |
| 签名允许的时间偏移(以秒为单位)。比如允许时间偏移 10 秒钟,那么就应设置为 `10`。如果将其设置为
`0`,则表示表示跳过日期检查。
|
| signed_headers | array[string] | 否 | |
| 要在加密计算中使用的 headers 列表。指定后客户端请求只能在此范围内指定
headers,如果未指定,就会在所有客户端请求指定的 headers 加入加密计算。如: ["User-Agent", "Accept-Language",
"x-custom-a"]。 |
| keep_headers | boolean | 否 | false | [ true, false ]
| 当设置为 `true` 时,认证成功后的 HTTP 请求中则会保留
`X-HMAC-SIGNATURE`、`X-HMAC-ALGORITHM` 和 `X-HMAC-SIGNED-HEADERS` 的请求头。否则将移除 HTTP
请求头。 |
-| encode_uri_param | boolean | 否 | true | [ true, false ]
| 当设置为 `true` 时,对签名中的 URI
参数进行编码。例如:`params1=hello%2Cworld` 进行了编码,`params2=hello,world` 没有进行编码。设置为
`false` 时则不对签名中的 URI 参数编码。 |
+| encode_uri_params| boolean | 否 | true | [ true, false ]
| 当设置为 `true` 时,对签名中的 URI
参数进行编码。例如:`params1=hello%2Cworld` 进行了编码,`params2=hello,world` 没有进行编码。设置为
`false` 时则不对签名中的 URI 参数编码。 |
| validate_request_body | boolean | 否 | false | [ true, false ]
| 当设置为 `true` 时,对请求 body 做签名校验。
|
| max_req_body | integer | 否 | 512 * 1024 |
| 最大允许的 body 大小。
|
@@ -112,13 +112,13 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 \
1. 提取 URL 中的 query 项。
2. 使用 `&` 作为分隔符,将 query 拆分成键值对。
-3. 如果 `encode_uri_param` 为 `true` 时:
+3. 如果 `encode_uri_params` 为 `true` 时:
- 当该项有 `key` 时,转换公式为 `url_encode(key) + "="`。
- 当该项同时有 `key` 和 `value` 时,转换公式为 `url_encode(key) + "=" +
url_encode(value)` 。此处 `value` 可以是空字符串。
- 将每一项转换后,以 `key` 按照字典顺序(ASCII 码由小到大)排序,并使用 `&` 符号连接起来,生成相应的
`canonical_query_string` 。
-4. 如果 `encode_uri_param` 为 `false` 时:
+4. 如果 `encode_uri_params` 为 `false` 时:
- 当该项只有 `key` 时,转换公式为 `key + "="` 。
- 当该项同时有 `key` 和 `value` 时,转换公式为 `key + "=" + value` 。此处 `value` 可以是空字符串。