1
0
Fork 0

Add redirect-ssl and different ssl_modes

This commit is contained in:
Joao M 2022-08-16 16:39:51 +00:00
parent 567f810e09
commit b363abea8c
15 changed files with 265 additions and 25 deletions

View file

@ -13,5 +13,9 @@
acl is_letsencrypt_{{ host }} path_beg /.well-known/acme-challenge/
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
{% else %}
use_backend srv_{{ host }} if is_rule_{{ host }}_1 OR is_rule_{{ host }}_2
{% endif %}
{% endfor %}