nginx/site: Add support for port in failover backend

This commit is contained in:
Timo Makinen 2021-09-14 16:52:48 +00:00
parent 74f828edf2
commit 6193276604

View file

@ -1,7 +1,11 @@
{% if proxy is defined and proxy is not string %}
upstream upstream_{{ site }} {
{% for item in proxy %}
{% if item | regex_search(".*:[0-9]+$") %}
server {{ item }};
{% else %}
server {{ item }}:443;
{% endif %}
{% endfor %}
}
{% endif %}