summaryrefslogtreecommitdiff
path: root/baserock_frontend/haproxy.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'baserock_frontend/haproxy.cfg')
-rw-r--r--baserock_frontend/haproxy.cfg11
1 files changed, 10 insertions, 1 deletions
diff --git a/baserock_frontend/haproxy.cfg b/baserock_frontend/haproxy.cfg
index c0983dd7..193effd5 100644
--- a/baserock_frontend/haproxy.cfg
+++ b/baserock_frontend/haproxy.cfg
@@ -32,7 +32,13 @@ defaults
frontend http-in
# All HTTP traffic is redirected to HTTPS using the '301 Moved' HTTP code.
bind *:80
- redirect scheme https code 301
+
+ acl host_webhook hdr(host) -m beg -i webhook
+ use_backend gitlab_webhook_http if host_webhook
+
+ # Don't redirect if is a webhook. We could generate SSL certs for this
+ # host to avoid Gitlab complaining.
+ redirect scheme https code 301 if !host_webhook
frontend https-in
# We do 'SSL termination' with HAProxy. So secure requests are received in
@@ -102,3 +108,6 @@ backend baserock_webserver_http
backend baserock_paste_http
server baserock_paste 10.3.0.13:7777
+
+backend gitlab_webhook_http
+ server baserock_gitlab_bot 10.3.0.13:1337