[HTTP check] Override Host header

Hello,

I have troubles overriding the Host header.

I want to test individually:

  • My CDN
  • My varnish
  • My backend

To do that i need to check the IP with a custom Header, if i had to script it i would use Curl:

So i tried to do something like that:

- type: http
  urls: ["http://IPCDN/myasset.json","http://IPvarnish/myasset.json","http://IPbackend/myasset.json"]
  check.request:
    method: GET
    headers:
      accept-encoding: gzip,deflate
      host: my_superb_domain_name.com

The Host header is not used, so i get a 404 or a 403 depending of the default behavior of my cdn/varnish/backend

Am i doing something wrong ?
Thank you

Apologies for the delay.

Unfortunately, as you've discovered, this does not work, partially due to the fact that the Go HTTP client treats the Host header as a special field.

If you could open a feature request issue on Github for this it'd be much appreciated. I think we should do this at some point, we can make this example work with some extra magic on our end.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.