refactor and properly set idlewaker error in JSON output

This commit is contained in:
yusing
2025-02-11 10:14:32 +08:00
parent 2a54aed135
commit b1f72620dc
3 changed files with 20 additions and 12 deletions

View File

@@ -207,7 +207,7 @@ func (r *ReveseProxyRoute) newHealthMonitor() interface {
} {
if a := r.Agent(); a != nil {
target := monitor.AgentTargetFromURL(r.ProxyURL)
return monitor.NewAgentRouteMonitor(a, r.HealthCheck, target)
return monitor.NewAgentProxiedMonitor(a, r.HealthCheck, target)
}
return monitor.NewHTTPHealthMonitor(r.ProxyURL, r.HealthCheck)
}