Add options to set headers on upstream http requests
This PR adds the command line option extra-http-header, which facilitates setting arbitrary http headers on the upstream prometheus request. This is required to support queries to prometheus compatible endpoints like Grafana Mimir, which expect an "X-Scope-OrgID:" header in the request to specify the tenant to query the data for.
Additionally, I have added a rewrite-host-header-to parameter, which supports rewriting the host to a different value than the source request. This would be needed in the case where the upstream prometheus endpoint is an nginx proxy or simliar using host base proxying. This addresses the issue https://github.com/prometheus-community/prom-label-proxy/issues/135.
Does not seem to be alot of activity in this repo. @SuperQ could you have a look at this PR ?
@simonpasquier are you able to look this PR ?
Hello, would love to see this merged. Prom-label-proxy is the exact solution we need for one of our projects. Unfortunately, our mTLS security requirements within our cluster prevent this PLP -> Prometheus networking without the ability to insert a particular header. Would greatly appreciate if someone would help take this to the finish line. Thanks.
Hello @graemechristie, this is exactly the solution we needed for our internal use case as well. Would love to see this get merged soon. Thanks!