From dad58ec5cd5c7babfcb890ba5367b5e72602206b Mon Sep 17 00:00:00 2001 From: Daniel Mills Date: Sat, 22 Dec 2018 14:26:03 -0800 Subject: [PATCH] Ignore undefined values for autoindex and health check (#80) * Ignore undefined autoindex * ignore undefined health_check_plus --- templates/http/default.conf.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/http/default.conf.j2 b/templates/http/default.conf.j2 index f2b07a0..db2a9ff 100644 --- a/templates/http/default.conf.j2 +++ b/templates/http/default.conf.j2 @@ -23,14 +23,14 @@ server { listen {{ item.value.port }}; {% endif %} server_name {{ item.value.server_name }}; -{% if item.value.autoindex %} +{% if item.value.autoindex is defined and item.value.autoindex %} autoindex on; {% endif %} {% if item.value.load_balancer is defined %} {% for location in item.value.load_balancer.locations %} location {{ item.value.load_balancer.locations[location].location }} { proxy_pass http://{{ item.value.load_balancer.locations[location].proxy_pass }}; -{% if item.value.load_balancer.health_check_plus %} +{% if item.value.load_balancer.health_check_plus is defined and item.value.load_balancer.health_check_plus %} health_check; {% endif %} proxy_set_header Host $host;