sourcegraph / checkup

Distributed, lock-free, self-hosted health checks and status pages
https://sourcegraph.github.io/checkup
MIT License
3.42k stars 248 forks source link

Enabling Host header and adding a HTTPSChecker #72

Closed magudb closed 6 years ago

magudb commented 6 years ago

HTTPChecker: Enabled adding Host header

http.Request will not adhere to a header being set as host, it will only adhere when using Request.Host. This is useful when using IP's to test instead of DNS, this means that a given application can resolve the service using the host header.

HTTPSChecker: Added, so that you can run https checks against a website.

This has been done by adding TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, I don't know if this is overkill, it could have been added to the HTTPChecker.

And sorry about the two things in a pull request.

mholt commented 6 years ago

Thanks; why is an HTTPSChecker necessary?

magudb commented 6 years ago

HttpsChecker is not a necessity, as I wrote the important part is

TLSClientConfig: &tls.Config{InsecureSkipVerify: true},

so that when testing https site you don't certificate errors. This could have been added to HTTPChecker, but then i would not change behavior there since it is "different" concerns.

magudb commented 6 years ago

I have removed HTTPSChecker but is still need InsecureSkipVerify: true to be able to test https sites