From 0a5b216f53d25a6e2dc27e3294fc4b8b56e1a0f0 Mon Sep 17 00:00:00 2001 From: Pierre Ozoux <pierre@ozoux.net> Date: Thu, 22 Dec 2016 14:32:03 +0000 Subject: [PATCH] Adds webhook! --- templates/haproxy.cfg.tmpl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/haproxy.cfg.tmpl b/templates/haproxy.cfg.tmpl index ab848f4..a3fe9a2 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}} -- GitLab