-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Active health checks do not support https #3450
Comments
Hello, I face a similar issue here, where I am unable to use the reverse proxy active healthcheck properly when https is enabled between the RP and its backend. I have the following setup, where the Caddy Load balancer is exposed by HTTPS and talks to its upstreams servers using HTTPS. It needs to make a health check on a specific endpoint (/v1/api), and overwrite the Host header.
Build: https://github.com/caddyserver/caddy/releases/tag/v2.0.0 Hopefully that helps, |
Are you able to compile from source? Could you try a couple things? Compile from the latest on master and see if it works first, we've made a handful of changes slated for v2.1 that may or may not already resolve it. If not, could you try to make this change: Change this section to this, to show a bit more info. This should confirm whether the line you linked to is properly setting the scheme to HTTPS. h.HealthChecks.Active.logger.Info("HTTP request failed",
zap.String("scheme", scheme),
zap.String("host", hostAddr),
zap.String("path", h.HealthChecks.Active.Path),
zap.Error(err),
) If it's not showing the scheme as if ht, ok := h.Transport.(TLSTransport); ok && ht.TLSEnabled() { Another thing to try would be to disable |
The code change fixed it, sent pull |
I'll keep this open until it's merged. Thanks! |
I have reverse proxy setup going to a couple of https only local services however the active health check doesn't seem to respect the tls flag.
Route:
Have I missed something or perhaps this check needs improving?
https://github.com/caddyserver/caddy/blob/master/modules/caddyhttp/reverseproxy/healthchecks.go#L201
The text was updated successfully, but these errors were encountered: