diff --git a/tasks/configure.yml b/tasks/configure.yml index 9d62797413111c386d8f501ab7d4454ea5beedcf..55c4a0caf9591278f93c6c18c4ca0fe806391e0a 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -102,7 +102,7 @@ owner='root' group='root' mode='644' - when: haproxy_private is defined and haproxy_private.domain + when: haproxy_private is defined and haproxy_private.domain is defined notify: "Check HAProxy Config" - name: "Create config file" diff --git a/templates/haproxy_cfg.jinja2 b/templates/haproxy_cfg.jinja2 index c252b7bd743afb5e4e4edbb1960da6ad504e4876..33cd2fb5d18d1f61b5046efbd3ec4ee19a4239f4 100644 --- a/templates/haproxy_cfg.jinja2 +++ b/templates/haproxy_cfg.jinja2 @@ -64,7 +64,7 @@ frontend http_in {% if haproxy_private.domain is defined %} acl privatedomain hdr(host) -i -n -f /etc/haproxy/privatelist.domain {% else %} - acl privatedomain if true + acl privatedomain hdr_cnt(X_Dummy) eq 0 {% endif %} acl privateip src -f /etc/haproxy/privatelist.ip acl private_auth http_auth(notprivate) if !privateip @@ -191,7 +191,7 @@ frontend https_in_{{ cert.ip }} {% if haproxy_private.domain is defined %} acl privatedomain hdr(host) -i -n -f /etc/haproxy/privatelist.domain {% else %} - acl privatedomain if true + acl privatedomain hdr_cnt(X_Dummy) eq 0 {% endif %} acl privateip src -f /etc/haproxy/privatelist.ip acl private_auth http_auth(notprivate) if !privateip