haproxy-manager-base/templates/hap_default_backend.tpl
jknapp 27f3f8959b
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 37s
Add default backend page for unmatched domains
- Add default backend template (hap_default_backend.tpl)
- Add customizable default page HTML template (default_page.html)
- Modify generate_config() to include default backend for unmatched domains
- Add environment variables for customizing default page content:
  - HAPROXY_DEFAULT_PAGE_TITLE
  - HAPROXY_DEFAULT_MAIN_MESSAGE
  - HAPROXY_DEFAULT_SECONDARY_MESSAGE
- Update README with documentation and examples
- Ensure backward compatibility with existing configurations
- Remove email contact link as requested
2025-07-11 19:10:05 -07:00

12 lines
482 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
http-response set-header Content-Type text/html
http-response set-body "{{ default_page_content }}"