haproxy-manager-base/templates/hap_default_backend.tpl
jknapp fac6cef0db
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 37s
Fix HAProxy 2.6 compatibility for default backend
- Replace http-response set-body (HAProxy 2.8+) with local server approach
- Add separate Flask server on port 8080 to serve default page
- Update default backend template to use local server instead of inline HTML
- Maintain all customization features via environment variables
- Fix JavaScript error handling for domains API response
2025-07-11 19:27:42 -07:00

11 lines
434 B
Smarty

# Default backend for unmatched domains
backend default-backend
mode http
option http-server-close
http-request set-header X-Forwarded-Proto https if { ssl_fc }
http-request set-header X-Forwarded-Port %[dst_port]
http-request set-header X-Forwarded-For %[src]
http-request set-header X-Real-IP %[src]
# Serve the default page HTML response using a local server
server default-page 127.0.0.1:8080