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

@ -10,7 +10,7 @@ The plugin creates:
Configuration:
- enabled: Enable/disable the plugin (default: true)
- document_root: Document root path (default: /etc/easyhaproxy/www)
- document_root: Document root path (default: /var/www/html)
- script_filename: Pattern for SCRIPT_FILENAME (default: %[path])
- index_file: Default index file (default: index.php)
- path_info: Enable PATH_INFO support (default: true)
@ -39,8 +39,6 @@ Example Kubernetes Annotation:
import os
import sys
from functions import Consts
# Add parent directory to path for imports
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
@ -52,7 +50,7 @@ class FastcgiPlugin(PluginInterface):
def __init__(self):
self.enabled = True
self.document_root = Consts.base_path + "/www"
self.document_root = "/var/www/html"
self.script_filename = "%[path]"
self.index_file = "index.php"
self.path_info = True