From 0201a7e9219fc0cf6e63f64b923e695b100c8461 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 3 Oct 2020 13:56:32 +0200 Subject: [PATCH] fix syntax if custom option is an 'if' expression --- templates/etc/nginx/sites-available/vhost.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/etc/nginx/sites-available/vhost.j2 b/templates/etc/nginx/sites-available/vhost.j2 index 5d0f263..9e3c8c1 100644 --- a/templates/etc/nginx/sites-available/vhost.j2 +++ b/templates/etc/nginx/sites-available/vhost.j2 @@ -83,7 +83,7 @@ server { {% if location.custom_options is defined and location.custom_options %} {% for inline_option in location.custom_options %} - {{ inline_option }}; + {{ inline_option }}{{ "" if inline_option.startswith("if ") else ";" }} {% endfor %} {% endif %} } @@ -101,7 +101,7 @@ server { {% if error_location.custom_options is defined and error_location.custom_options %} {% for inline_option in error_location.custom_options %} - {{ inline_option }}; + {{ inline_option }}{{ "" if inline_option.startswith("if ") else ";" }} {% endfor %} {% endif %} }