Skip to content

Commit

Permalink
only change conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Aug 30, 2024
1 parent bb3cc50 commit 4eeed8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/resty/aws/request/build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ local function build_request(operation, config, params)
local body_tbl = {}

if config.signingName or config.targetPrefix then
request.headers["X-Amz-Target"] = (config.targetPrefix or config.signingName) .. "." .. operation.name
if operation.name == "DetectToxicContent" then
request.headers["X-Amz-Target"] = (config.targetPrefix or config.signingName) .. "." .. operation.name
else
request.headers["X-Amz-Target"] = (config.signingName or config.targetPrefix) .. "." .. operation.name
end
end
if config.protocol == "query" then
request.query["Action"] = operation.name
Expand Down

0 comments on commit 4eeed8c

Please sign in to comment.