From e4287b3a489ca142f4c7c5d1dda000ce5f3f0419 Mon Sep 17 00:00:00 2001 From: Michiel de Jong <michiel@unhosted.org> Date: Sun, 9 Nov 2014 14:47:55 +0000 Subject: [PATCH] Variation on http://stackoverflow.com/a/16528383/680454 --- confd/templates/haproxy.cfg.tmpl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/confd/templates/haproxy.cfg.tmpl b/confd/templates/haproxy.cfg.tmpl index 6670319..1e2df79 100644 --- a/confd/templates/haproxy.cfg.tmpl +++ b/confd/templates/haproxy.cfg.tmpl @@ -32,17 +32,7 @@ mode http frontend http-in bind *:80 -{{range $app := lsdir "/services"}} -{{$hostnames := printf "/services/%s/*" $app}} - {{range gets $hostnames}} - {{$hostname := .Key}} - {{$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}} + redirect scheme https code 301 {{range $app := lsdir "/services"}} {{$hostnames := printf "/services/%s/*" $app}} -- GitLab