nic-chen commented on a change in pull request #2239: URL: https://github.com/apache/apisix/pull/2239#discussion_r490192846
########## File path: apisix/plugins/hmac-auth.lua ########## @@ -182,13 +201,25 @@ local function generate_signature(ctx, secret_key, params) canonical_query_string = core.table.concat(query_tab, "&") end - local req_body = core.request.get_body() - req_body = req_body or "" + local canonical_headers = "" + + core.log.info("all headers: ", core.json.encode(core.request.headers(), true)) + + for _, h in pairs(params.signed_headers) do + canonical_headers = canonical_headers .. (core.request.header(ctx, h) or "") Review comment: not quite understand here, this is concatenating a string to generate a signature ---------------------------------------------------------------- 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