diff --git a/templates/frontend-mode-http.j2 b/templates/frontend-mode-http.j2 index e6392ad..481f6ae 100644 --- a/templates/frontend-mode-http.j2 +++ b/templates/frontend-mode-http.j2 @@ -14,7 +14,7 @@ use_backend letsencrypt_backend if is_letsencrypt_{{ host }} is_rule_{{ host }}_1 OR is_letsencrypt_{{ host }} is_rule_{{ host }}_2 {% endif %} {% if o["hosts"][k]["redirect_ssl"] %} - http-request redirect scheme https code 301 if is_rule_{{ host }}_1 OR is_rule_{{ host }}_2 + http-request redirect scheme https code 301 if !is_letsencrypt_{{ host }} is_rule_{{ host }}_1 OR !is_letsencrypt_{{ host }} is_rule_{{ host }}_2 {% else %} use_backend srv_{{ host }} if is_rule_{{ host }}_1 OR is_rule_{{ host }}_2 {% endif %} diff --git a/tests/expected/services-redirect-ssl.txt b/tests/expected/services-redirect-ssl.txt index 9317251..3a3fb09 100644 --- a/tests/expected/services-redirect-ssl.txt +++ b/tests/expected/services-redirect-ssl.txt @@ -32,7 +32,7 @@ frontend http_in_80 acl is_rule_host1_local_80_1 hdr(host) -i host1.local acl is_rule_host1_local_80_2 hdr(host) -i host1.local:80 - http-request redirect scheme https code 301 if is_rule_host1_local_80_1 OR is_rule_host1_local_80_2 + http-request redirect scheme https code 301 if !is_letsencrypt_host1_local_80 is_rule_host1_local_80_1 OR !is_letsencrypt_host1_local_80 is_rule_host1_local_80_2 backend srv_host2_local_80 balance roundrobin