Skip to content

Commit

Permalink
Match Accept header with Content-Type in the proto exporter (#3562)
Browse files Browse the repository at this point in the history
* Match Accept header with Content-Type in the proto exporter

* Lint fixes

* Add changelog entry
  • Loading branch information
scheler authored Jan 24, 2023
1 parent 9589d54 commit bcfb1b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/

### :bug: (Bug Fix)

* fix(otlp-proto-exporter-base): Match Accept header with Content-Type in the proto exporter
[#3562](https://github.com/open-telemetry/opentelemetry-js/pull/3562) @scheler

### :books: (Refine Doc)

### :house: (Internal)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ export abstract class OTLPProtoExporterBrowserBase<
sendWithXhr(
new Blob([body], { type: 'application/x-protobuf' }),
this.url,
{ ...this._headers, 'Content-Type': 'application/x-protobuf' },
{
...this._headers,
'Content-Type': 'application/x-protobuf',
Accept: 'application/x-protobuf',
},
this.timeoutMillis,
onSuccess,
onError
Expand Down

0 comments on commit bcfb1b6

Please sign in to comment.