From e5c1676b0ee64779d1f4a5caf9b9c1dc225cab0f Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Wed, 11 Jul 2018 13:54:48 +0200
Subject: [PATCH] Add support for extra lines in proxy config

---
 templates/haproxy_cfg.jinja2 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/templates/haproxy_cfg.jinja2 b/templates/haproxy_cfg.jinja2
index 6c73623..06d42c4 100644
--- a/templates/haproxy_cfg.jinja2
+++ b/templates/haproxy_cfg.jinja2
@@ -85,6 +85,9 @@ frontend http_in
   acl private_auth http_auth(notprivate) if !privateip
   http-request auth realm notprivate if !letsencrypt_challenge privatedomain !privateip !private_auth
 {% endif %}
+{% for line in proxy_extra_lines|default([]) %}
+  {{ line }}
+{% endfor %}
 {% for host in groups['all']|sort %}
 {% for redirect in hostvars[host].proxy_redirect|default([]) %}
 {% for from in redirect.from %}
@@ -206,6 +209,9 @@ frontend https_in_{{ cert.ip }}
   acl private_auth http_auth(notprivate) if !privateip
   http-request auth realm notprivate if privatedomain !privateip !private_auth
 {% endif %}
+{% for line in proxy_extra_lines|default([]) %}
+  {{ line }}
+{% endfor %}
   acl blockedip src -f /etc/haproxy/blacklist.ip
   http-request deny if blockedip
   acl blockedreferer hdr_sub(referer) -i -f /etc/haproxy/blacklist.referer
-- 
GitLab