Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/crowdsec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ local APPSEC_HOST_HEADER = "x-crowdsec-appsec-host"
local APPSEC_VERB_HEADER = "x-crowdsec-appsec-verb"
local APPSEC_URI_HEADER = "x-crowdsec-appsec-uri"
local APPSEC_USER_AGENT_HEADER = "x-crowdsec-appsec-user-agent"
local APPSEC_TRANSFER_ENCODING_HEADER = "x-crowdsec-appsec-transfer-encoding"
local REMEDIATION_API_KEY_HEADER = 'x-api-key'
local METRICS_PERIOD = 900

Expand Down Expand Up @@ -605,6 +606,10 @@ function csmod.AppSecCheck(ip)
if headers["content-length"] == nil then
headers["content-length"] = tostring(#body)
end
if headers["transfer-encoding"] ~= nil then
headers[APPSEC_TRANSFER_ENCODING_HEADER] = headers["transfer-encoding"]
headers["transfer-encoding"] = nil
end
end
else
headers["content-length"] = nil
Expand Down
Loading