Skip to content

Commit

Permalink
Add an accept header in JSON request to help 3rd party services like …
Browse files Browse the repository at this point in the history
…localstack (#1721)
  • Loading branch information
jderusse authored Jun 5, 2024
1 parent e11f535 commit 4d8408a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Changed

- Add `Accept: application/json` header in request to fix incompatibility with 3rd party providers

## 1.6.0

### Added
Expand Down
1 change: 1 addition & 0 deletions src/Input/GetAuthorizationTokenRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function request(): Request
$headers = [
'Content-Type' => 'application/x-amz-json-1.1',
'X-Amz-Target' => 'AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken',
'Accept' => 'application/json',
];

// Prepare query
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Input/GetAuthorizationTokenRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public function testRequest(): void
POST / HTTP/1.0
Content-Type: application/x-amz-json-1.1
x-amz-target: AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken
Accept: application/json
{}
';
Expand Down

0 comments on commit 4d8408a

Please sign in to comment.