You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/10/23 03:36:00 UTC

[GitHub] [apisix] gxthrj commented on a change in pull request #2491: feat: In the request of the hmac-auth plugin, remove the request he…

gxthrj commented on a change in pull request #2491:
URL: https://github.com/apache/apisix/pull/2491#discussion_r510574841



##########
File path: apisix/plugins/hmac-auth.lua
##########
@@ -343,6 +370,19 @@ local function get_params(ctx)
     params.date  = date or ""
     params.signed_headers = signed_headers and ngx_re.split(signed_headers, ";")
 
+    local keep_headers = get_keep_headers(params.access_key)
+    core.log.info("keep_headers: ", keep_headers)
+
+    if not keep_headers then
+        remove_headers(signature_key, algorithm_key, signed_headers_key)
+
+        if params.signed_headers then

Review comment:
       we do not need to remove the headers defined in `signed_headers`.
   It may cause bugs.




----------------------------------------------------------------
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:
users@infra.apache.org