From 94af4e47c12884e3d9bdf70393c1cbec5a76c442 Mon Sep 17 00:00:00 2001 From: jknapp Date: Thu, 26 Feb 2026 15:31:14 -0800 Subject: [PATCH] Add Host header capture to frontend for connection debugging Captures the Host header in HAProxy httplog output so high-connection alerts can be correlated to specific domains. Co-Authored-By: Claude Opus 4.6 --- templates/hap_listener.tpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/hap_listener.tpl b/templates/hap_listener.tpl index 0c80c63..d5b39b0 100644 --- a/templates/hap_listener.tpl +++ b/templates/hap_listener.tpl @@ -4,6 +4,9 @@ frontend web # crt can now be a path, so it will load all .pem files in the path bind 0.0.0.0:443 ssl crt {{ crt_path }} alpn h2,http/1.1 + # Capture Host header so it appears in httplog output (in %hr field) + http-request capture req.hdr(Host) len 64 + # Detect real client IP from proxy headers if they exist # Priority: CF-Connecting-IP (Cloudflare) > X-Real-IP > X-Forwarded-For > src acl has_cf_connecting_ip req.hdr(CF-Connecting-IP) -m found