prom-label-proxy icon indicating copy to clipboard operation
prom-label-proxy copied to clipboard

Add options to set headers on upstream http requests

Open graemechristie opened this issue 2 years ago • 4 comments

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.

graemechristie avatar Jul 14 '23 08:07 graemechristie

Does not seem to be alot of activity in this repo. @SuperQ could you have a look at this PR ?

graemechristie avatar Jul 18 '23 04:07 graemechristie

@simonpasquier are you able to look this PR ?

graemechristie avatar Aug 01 '23 05:08 graemechristie

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.

jellyfish-headphones avatar Mar 13 '25 19:03 jellyfish-headphones

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!

dhanushm7 avatar May 02 '25 08:05 dhanushm7