fix vhost template if the vhost doesn't have a backend

This commit is contained in:
nd 2021-08-20 11:43:04 +02:00
parent fc5a1f4b2d
commit 87e7cacfd9
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9

View file

@ -2,7 +2,7 @@
{% set vhost = {}|combine(nginx_vhosts_defaults, item.value, recursive=True) %} {% set vhost = {}|combine(nginx_vhosts_defaults, item.value, recursive=True) %}
{% set vhost_name = item.key %} {% set vhost_name = item.key %}
{% set vhost_headers = {}|combine(nginx.add_headers, vhost.add_headers) %} {% set vhost_headers = {}|combine(nginx.add_headers, vhost.add_headers) %}
{% set vhost_proxy_location = {}|combine(nginx_proxy_location, {'backend': vhost.backend }) if vhost.backend|d(False) else [] %} {% set vhost_proxy_location = {}|combine(nginx_proxy_location, {'backend': vhost.backend }) if vhost.backend|d(False) else {} %}
{% macro nginx_listen(ips, port, options) %} {% macro nginx_listen(ips, port, options) %}
{% for ip in ips %} {% for ip in ips %}