diff --git a/templates/frontend-mode-http.j2 b/templates/frontend-mode-http.j2 index fa4a73a..620d536 100644 --- a/templates/frontend-mode-http.j2 +++ b/templates/frontend-mode-http.j2 @@ -11,7 +11,7 @@ acl is_rule_{{ host }}_2 hdr(host) -i {{ k }}:{{ o["port"] }} {% if letsencrypt %} acl is_letsencrypt_{{ host }} path_beg /.well-known/acme-challenge/ - use_backend letsencrypt_backend if (is_rule_{{ host }}_1 OR is_rule_{{ host }}_2) AND is_letsencrypt_{{ host }} + use_backend letsencrypt_backend if is_letsencrypt_{{ host }} is_rule_{{ host }}_1 OR is_letsencrypt_{{ host }} is_rule_{{ host }}_2 {% endif %} use_backend srv_{{ host }} if is_rule_{{ host }}_1 OR is_rule_{{ host }}_2 {% endfor %} diff --git a/tests/expected/services.txt b/tests/expected/services.txt index 0f88169..c55ac96 100644 --- a/tests/expected/services.txt +++ b/tests/expected/services.txt @@ -36,7 +36,7 @@ frontend http_in_31337_2 acl is_rule_node-exporter_quantum_example_org_31337_2_1 hdr(host) -i node-exporter.quantum.example.org acl is_rule_node-exporter_quantum_example_org_31337_2_2 hdr(host) -i node-exporter.quantum.example.org:31337 acl is_letsencrypt_node-exporter_quantum_example_org_31337_2 path_beg /.well-known/acme-challenge/ - use_backend letsencrypt_backend if (is_rule_node-exporter_quantum_example_org_31337_2_1 OR is_rule_node-exporter_quantum_example_org_31337_2_2) AND is_letsencrypt_node-exporter_quantum_example_org_31337_2 + use_backend letsencrypt_backend if is_letsencrypt_node-exporter_quantum_example_org_31337_2 is_rule_node-exporter_quantum_example_org_31337_2_1 OR is_letsencrypt_node-exporter_quantum_example_org_31337_2 is_rule_node-exporter_quantum_example_org_31337_2_2 use_backend srv_node-exporter_quantum_example_org_31337_2 if is_rule_node-exporter_quantum_example_org_31337_2_1 OR is_rule_node-exporter_quantum_example_org_31337_2_2 backend srv_cadvisor_quantum_example_org_31337_2 diff --git a/tests/expected/static.txt b/tests/expected/static.txt index 3741168..a84241b 100644 --- a/tests/expected/static.txt +++ b/tests/expected/static.txt @@ -42,7 +42,7 @@ frontend http_in_80_1 acl is_rule_host1_com_br_80_1_1 hdr(host) -i host1.com.br acl is_rule_host1_com_br_80_1_2 hdr(host) -i host1.com.br:80 acl is_letsencrypt_host1_com_br_80_1 path_beg /.well-known/acme-challenge/ - use_backend letsencrypt_backend if (is_rule_host1_com_br_80_1_1 OR is_rule_host1_com_br_80_1_2) AND is_letsencrypt_host1_com_br_80_1 + use_backend letsencrypt_backend if is_letsencrypt_host1_com_br_80_1 is_rule_host1_com_br_80_1_1 OR is_letsencrypt_host1_com_br_80_1 is_rule_host1_com_br_80_1_2 use_backend srv_host1_com_br_80_1 if is_rule_host1_com_br_80_1_1 OR is_rule_host1_com_br_80_1_2 acl is_rule_host2_com_br_80_1_1 hdr(host) -i host2.com.br