diff --git a/templates/haproxy.cfg.tmpl b/templates/haproxy.cfg.tmpl index ab848f4ce130ecb192213581c28752f80d3549bc..a3fe9a29d452999c9e3053e2bda6084b2e261e4a 100644 --- a/templates/haproxy.cfg.tmpl +++ b/templates/haproxy.cfg.tmpl @@ -34,6 +34,9 @@ mode http rspadd Strict-Transport-Security:\ max-age=15768000 use_backend letsencrypt-web if { path_beg /.well-known/acme } +{{ range $host, $containers := groupBy $ "Env.LIBRESH_WEBHOOK_HOST" }} + use_backend webhook if { path_beg /XxosJDdRpo7Rww87VkJGzv1QLegnhh-uniq-libresh } +{{end}} {{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }} use_backend {{ $host}} if { hdr(host) -i {{ $host }} } {{end}} @@ -60,3 +63,8 @@ backend {{ $host }} backend letsencrypt-web cookie SERVERID insert nocache indirect server Server letsencrypt-web:80 cookie Server +{{ range $host, $containers := groupBy $ "Env.LIBRESH_WEBHOOK_HOST" }} +backend webhook + cookie SERVERID insert nocache indirect + server Server webhook:80 cookie Server +{{end}}