From 5ae804975f5af912d915a450309e544e217cae6a Mon Sep 17 00:00:00 2001 From: pierreozoux <pierre@ozoux.net> Date: Mon, 27 Oct 2014 15:49:44 +0000 Subject: [PATCH] Allows www on hostnames --- confd/templates/haproxy.cfg.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confd/templates/haproxy.cfg.tmpl b/confd/templates/haproxy.cfg.tmpl index bf6aab8..344745d 100644 --- a/confd/templates/haproxy.cfg.tmpl +++ b/confd/templates/haproxy.cfg.tmpl @@ -29,6 +29,7 @@ mode http {{$data := json .Value}} # {{base $hostname}}: acl https_{{base $hostname}} hdr(host) -i {{base $hostname}} + acl https_{{base $hostname}} hdr(host) -i www.{{base $hostname}} use_backend {{base $hostname}} if https_{{base $hostname}} {{end}} {{end}} @@ -44,6 +45,7 @@ frontend http-in {{$data := json .Value}} # {{base $hostname}}: acl is_{{base $hostname}} hdr(host) -i {{base $hostname}} + acl is_{{base $hostname}} hdr(host) -i www.{{base $hostname}} use_backend {{base $hostname}} if is_{{base $hostname}} {{end}} {{end}} -- GitLab