fix signature check when content length not included

This commit is contained in:
Ben McClelland
2023-06-07 08:37:14 -07:00
parent e75baad56c
commit 002c427e7d
5 changed files with 31 additions and 5 deletions
+6
View File
@@ -54,6 +54,12 @@ func CreateHttpRequestFromCtx(ctx *fiber.Ctx, signedHdrs []string) (*http.Reques
}
})
// Check if Content-Length in signed headers
// If content length is non 0, then the header will be included
if !includeHeader("Content-Length", signedHdrs) {
httpReq.ContentLength = 0
}
// Set the Host header
httpReq.Host = string(req.Header.Host())