1
0
Fork 0

Introduce embedded HTTP server for HAProxy monitoring dashboard

- Added a Python-based HTTP server to serve `dashboard.html` at `/` or `/dashboard.html` paths.
- Updated HAProxy configuration to integrate backend for the dashboard.
- Enhanced handling of index paths with conditional redirects to the dashboard page.
- Modified tests and updated expected outputs to reflect these changes.
This commit is contained in:
Joao Gilberto Magalhaes 2026-02-22 19:42:51 -05:00
parent 67cfcf3aff
commit 7e3134155a
16 changed files with 153 additions and 70 deletions

View file

@ -50,8 +50,14 @@ frontend dashboard
mode http
acl is_index path /
acl is_index path /index.html
http-request return status 200 content-type "text/html" file /etc/easyhaproxy/www/dashboard.html if is_index
http-request return status 404
acl is_dashboard path /dashboard.html
http-request set-path /dashboard.html if is_index
http-request return status 404 if !is_dashboard
default_backend srv_dashboard
backend srv_dashboard
mode http
server Local 127.0.0.1:9190
frontend http_in_19901
bind *:19901