grafana / xk6-client-prometheus-remote

A k6 extension for testing Prometheus Remote Write endpoints
Apache License 2.0
24 stars 12 forks source link

Fix Host header in http req #26

Closed syepes closed 1 year ago

syepes commented 1 year ago

The HTTP Host field can not be modified with the standard headers, this make it work

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

syepes commented 1 year ago

Any news on this merge? I would like to use the official images :-)

mstoykov commented 1 year ago

Hi, sorry @syepes - I don't think anyone specifically looks at this repo at this point :(

After looking at the docs, as I don't really remember the precedence of Host the field, the header and the URL:

// For client requests, Host optionally overrides the Host // header to send. If empty, the Request.Write method uses // the value of URL.Host. Host may contain an international // domain name.

It seems like this is truly needed to overwrite the host in case the header needs to be different from the one that is in the url, so :+1: