membphis commented on a change in pull request #2301: URL: https://github.com/apache/apisix/pull/2301#discussion_r495362521
########## File path: doc/plugins/hmac-auth.md ########## @@ -40,7 +40,7 @@ The `consumer` then adds its key to request header to verify its request. | access_key | string | required | | | Different `consumer` objects should have different values, and it should be unique. If different consumers use the same `access_key`, a request matching exception will occur. | | secret_key | string | required | | | Use as a pair with `access_key`. | | algorithm | string | optional | "hmac-sha256" | ["hmac-sha1", "hmac-sha256", "hmac-sha512"] | Encryption algorithm. | -| clock_skew | integer | optional | 300 | | The clock skew allowed by the signature in seconds. For example, if the time is allowed to skew by 10 seconds, then it should be set to `10`. especially, `0` means not checking timestamp | +| clock_skew | integer | optional | 300 | | The clock skew allowed by the signature in seconds. For example, if the time is allowed to skew by 10 seconds, then it should be set to `10`. especially, `0` means not checking `HTTP Date` | Review comment: missing update? ########## File path: doc/zh-cn/plugins/hmac-auth.md ########## @@ -142,6 +143,21 @@ Accept-Ranges: bytes ``` +## 自定义 header 名称 + +我们可以在 `conf/config.yaml` 中,`plugin_attr` 下添加插件的属性配置来自定义参数 header 名称。 + +```yaml +plugin_attr: + hmac-auth: + signature_key: X-APISIX-HMAC-SIGNATURE + algorithm_key: X-APISIX-HMAC-ALGORITHM + http_date_key: X-APISIX-DATE + access_key: X-APISIX-HMAC-ACCESS-KEY + signed_headers_key: X-APISIX-HMAC-SIGNED-HEADERS +``` + Review comment: After setting, how to use it, need an example. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org