diff --git a/etc/haproxy/haproxy.cfg b/etc/haproxy/haproxy.cfg index cad172f..a89823c 100644 --- a/etc/haproxy/haproxy.cfg +++ b/etc/haproxy/haproxy.cfg @@ -111,8 +111,6 @@ frontend external bind 0.0.0.0:80,:::80 bind 0.0.0.0:443,:::443 ssl strict-sni alpn h2,http/1.1 crt /etc/haproxy/ssl - capture request header Host len 32 - option forwardfor errorfiles boost-default-errors @@ -123,8 +121,10 @@ frontend external # Remove a possible x-forwarded-for header already present http-request del-header x-forwarded-for if { req.hdr(x-forwarded-for) -m found } - # store the Host header in lowercase, to speedup ACL later + # Store the Host header in lowercase, to speedup ACL later http-request set-var(req.hdr_host) req.hdr(host),lower + # Capture host header in logs + http-request capture var(req.hdr_host) len 32 # Is the request coming for the server itself (stats…) acl self var(req.hdr_host) -m str my-hostname my-hostname.domain.tld @@ -220,13 +220,16 @@ backend goto_internal frontend internal bind /run/haproxy-frontend-default.sock user root mode 666 accept-proxy - capture request header Host len 32 - option forwardfor # Check URL (used by Varnish) monitor-uri /haproxycheck + # Store the Host header in lowercase, to speedup ACL later + http-request set-var(req.hdr_host) req.hdr(host),lower + # Capture host header in logs + http-request capture var(req.hdr_host) len 32 + acl varnish_from hdr(X-Varnish) -m found acl forwarded_proto hdr(x-forwarded-proto) -m found diff --git a/slides.odp b/slides.odp index 2b423fc..19724f9 100644 Binary files a/slides.odp and b/slides.odp differ diff --git a/slides.pdf b/slides.pdf index b2c7725..452c681 100644 Binary files a/slides.pdf and b/slides.pdf differ