mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-06-20 09:52:14 +08:00
The site healthcheck built its request URL from the indexed site URL (e.g. http://example.com) and never rewrote the scheme to match the user-configured HealthCheckConfig.Protocol. As a result, sites configured for HTTPS were probed over HTTP and always shown as unreachable. TestHealthCheck compounded the issue by using siteConfig.Scheme (default "http") instead of req.Config.Protocol. Introduce rewriteCheckURLScheme which aligns only the URL scheme with the configured protocol while preserving path, query, and port, and call it from CheckSiteWithConfig. TestHealthCheck now passes the stored site URL and relies on the same rewrite, so the "Test" button exercises the same code path as the scheduled checker. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>