Skip to content

Commit

Permalink
Ensure request signer adds static auth header *after* signing.
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperaj committed Jul 12, 2024
1 parent 000d7d4 commit 01ac1a7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ public function __construct(readonly private SignatureV4 $signer, array $headers

public function sign(RequestInterface $request): RequestInterface
{
$request = $this->signer->signRequest($request, $this->credentials);

foreach ($this->headers as $header => $value) {
$request = $request->withHeader($header, $value);
}

return $this->signer->signRequest($request, $this->credentials);
return $request;
}
}

0 comments on commit 01ac1a7

Please sign in to comment.