mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-09-18 16:45:19 +00:00
4272dbb4ef
CRITICAL FIX: Prevent 'option httpchk' duplication in HAProxy config by implementing 3-layer validation: 1. BULK IMPORT PARSER: - Frontend: Filter out 'option httpchk' with warning (not applicable to frontends) - Backend: Already filtering 'option httpchk' (handled by health_check_uri field) 2. BACKEND API: - Backend create/update: Auto-filter 'option httpchk' from options field - Frontend create/update: Auto-filter 'option httpchk' from options field - Added filter_httpchk_from_options() helper function in both routers 3. FRONTEND UI: - Backend modal: Real-time warning when 'option httpchk' is typed - Frontend modal: Real-time warning when 'option httpchk' is typed - Warning messages guide users to use proper fields instead Changes: - backend/utils/haproxy_config_parser.py: Added httpchk filtering for frontend parsing - backend/routers/backend.py: Added filter function + applied to create/update - backend/routers/frontend.py: Added filter function + applied to create/update - frontend/src/components/BackendServers.js: Added dynamic warning for httpchk - frontend/src/components/FrontendManagement.js: Added dynamic warning for httpchk User Experience: ✅ Bulk Import: Automatically filters httpchk, shows warning in preview ✅ Manual Entry: Shows real-time warning, auto-filters on save ✅ No Config Duplication: 'option httpchk' never appears twice in generated config Impact: Users can safely paste or type 'option httpchk' without breaking HAProxy config. System automatically filters it and guides users to use the Health Check URI field instead.