Unleash / unleash-proxy-client-js

A browser client that can be used together with the unleash-proxy.
Apache License 2.0
44 stars 46 forks source link

`customHeaders` aren't included in metrics requests #142

Closed thomasheartman closed 1 year ago

thomasheartman commented 1 year ago

Describe the bug

According to this slack thread and @kwasniew's digging:

Custom headers aren't included in metrics requests.

Steps to reproduce the bug

  1. Initialize the proxy client with custom headers
  2. Check the network tab and watch for metrics requests
  3. Confirm that the metrics requests don't contain the custom headers

Expected behavior

When I provide custom headers to the client, I'd expect it to use these headers for all communication with the upstream.

This is also what the readme suggests:

Additional headers to use when making HTTP requests to the Unleash proxy. In case of name collisions with the default headers, the customHeaders value will be used.

Logs, error output, etc.

No response

Screenshots

No response

Additional context

No response

Unleash version

No response

Subscription type

None

Hosting type

None

SDK information (language and version)

2.4.2