@marcel91200 / caddy Mirror · read-only / commits / 22055c5e
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

reverseproxy: Fix https active health checks #3450 (#3451)

AndyBan committed May 26, 2020 at 19:40 UTC 22055c5e0f07cf8865c148b8139d221123988aad
1 file changed +1 -1
modules/caddyhttp/reverseproxy/healthchecks.go
+1 -1
@@ -198,7 +198,7 @@ func (h *Handler) doActiveHealthCheckForAllHosts() {
198 func (h *Handler) doActiveHealthCheck(dialInfo DialInfo, hostAddr string, host Host) error {
199 // create the URL for the request that acts as a health check
200 scheme := "http"
201 - if ht, ok := h.Transport.(*http.Transport); ok && ht.TLSClientConfig != nil {
201 + if ht, ok := h.Transport.(TLSTransport); ok && ht.TLSEnabled() {
202 // this is kind of a hacky way to know if we should use HTTPS, but whatever
203 scheme = "https"
204 }