As a devops I'd like to use exporter_exporter to get metrics from an application that is available on localhost (127.0.0.1) but only answer with a specific Host header that is not the same as exporter_exporter
This also allow the query of SaaS because every SaaS product expect a specific host header to be set : you have to call aws-azure-gcp.cloud/api/prom/metrics with the right host header not w.x.y.z/api/prom/metrics
As a devops I'd like to use exporter_exporter to get metrics from an application that is available on localhost (127.0.0.1) but only answer with a specific Host header that is not the same as exporter_exporter
This also allow the query of SaaS because every SaaS product expect a specific host header to be set : you have to call
aws-azure-gcp.cloud/api/prom/metrics
with the right host header notw.x.y.z/api/prom/metrics
Go documentation for header override https://cs.opensource.google/go/go/+/refs/tags/go1.18.1:src/net/http/request.go;l=235