Fix redirect loop
This commit is contained in:
parent
3e561e557f
commit
0a4f78a153
2 changed files with 2 additions and 2 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
use_backend letsencrypt_backend if is_letsencrypt_{{ host }} is_rule_{{ host }}_1 OR is_letsencrypt_{{ host }} is_rule_{{ host }}_2
|
use_backend letsencrypt_backend if is_letsencrypt_{{ host }} is_rule_{{ host }}_1 OR is_letsencrypt_{{ host }} is_rule_{{ host }}_2
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if o["hosts"][k]["redirect_ssl"] %}
|
{% 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 %}
|
{% else %}
|
||||||
use_backend srv_{{ host }} if is_rule_{{ host }}_1 OR is_rule_{{ host }}_2
|
use_backend srv_{{ host }} if is_rule_{{ host }}_1 OR is_rule_{{ host }}_2
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -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_1 hdr(host) -i host1.local
|
||||||
acl is_rule_host1_local_80_2 hdr(host) -i host1.local:80
|
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
|
backend srv_host2_local_80
|
||||||
balance roundrobin
|
balance roundrobin
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue