Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for custom http request headers per servergroup #646

Merged

Conversation

urgerestraint
Copy link
Contributor

@urgerestraint urgerestraint commented Apr 2, 2024

Context

  • Grafana Mimir and Cortex-Tenant both require the use of an X-Scope-OrgID header to specify for which TSDB tenant a read or write request is being made for (these may be concatenated with pipes between each tenant string); more here
  • To support the query and remote read paths for Grafana Mimir, this change adds a configurable map of headers to be attached to each request for a given ServerGroup via config
  • Addresses Working CLI help / example for --proxy-headers #643

Changes

  • Add HTTPClientHeaders as a simple string map to ServerGroup config to match the middleware format
  • On the custom RoundTripper, also mutate the request with the SG level headers on each request, after the middleware to respect proxy-headers

Fixes #643

@jacksontj jacksontj merged commit 35f7829 into jacksontj:master Apr 12, 2024
1 check passed
@jacksontj
Copy link
Owner

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Working CLI help / example for --proxy-headers
2 participants