From ffdde4d4c6fa84d627dfa84d5285b2519488c9e6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 18 Jul 2019 23:24:20 +0200 Subject: [PATCH] fix proxy header separation --- templates/etc/nginx/sites-available/vhost.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 %} }