diff --git a/templates/etc/nginx/sites-available/vhost.j2 b/templates/etc/nginx/sites-available/vhost.j2 index 0089a57..b61ad27 100644 --- a/templates/etc/nginx/sites-available/vhost.j2 +++ b/templates/etc/nginx/sites-available/vhost.j2 @@ -43,10 +43,12 @@ server { {% if location.proxy_http_version is defined and location.proxy_http_version %} proxy_http_version {{ location.proxy_http_version }}; {% endif %} - {% for pheader in location.proxy_headers | default([]) %} + {% if location.proxy_headers is defined and location.proxy_headers %} + {% for pheader in location.proxy_headers %} proxy_set_header {{ pheader }}; {% endfor %} + {% endif %} {% endif %} }