diff --git a/backend/health-proxy.py b/backend/health-proxy.py index fd54fd7..34e247b 100644 --- a/backend/health-proxy.py +++ b/backend/health-proxy.py @@ -45,6 +45,7 @@ def healthcheck(): host_attr = svc.get('host') proto_attr = svc.get('proto') or proto port_attr = svc.get('port') or port + health_path = svc.get('health-path', '') # Custom health check path (e.g., /api/health, /ping) # prefer local-ip if present target_host = local_ip or root_tailscale or (host_attr.split(':')[0] if host_attr and ':' in host_attr else None) or host @@ -60,7 +61,9 @@ def healthcheck(): if not host or not port: return jsonify({'error': 'missing parameters, expected host and port or id'}), 400 - url = f"{proto}://{host}:{port}" + # Build URL with optional custom health path + health_path = health_path if 'health_path' in locals() else '' + url = f"{proto}://{host}:{port}{health_path}" try: # Use HEAD to do a lightweight check