Skip to content

Commit cc03036

Browse files
authored
HTTP template: Fix bug with single custom_directives (#213)
1 parent 4c9508d commit cc03036

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ FEATURES:
1010

1111
Add `backup` variable to template and upload parameters. Set to `false` if you don't want to keep backups of your previous NGINX config files.
1212

13+
BUG FIXES:
14+
15+
Fix a bug when using a single `custom_directives` entry and the http template
16+
1317
## 0.4.2 (October 28, 2021)
1418

1519
BUG FIXES:

templates/http/default.conf.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
{% for directive in item['config']['custom_directives'] if item['config']['custom_directives'] is not string %}
9393
{{ directive }}
9494
{% else %}
95-
{{ item['config']['custom_directive'] }}
95+
{{ item['config']['custom_directives'] }}
9696
{% endfor %}
9797
{% endif %}
9898
{% if item['config']['servers'] is defined %}
@@ -228,7 +228,7 @@ server {
228228
{{ directive }}
229229
{% endfilter %}
230230
{% else %}
231-
{{ server['custom_directive'] }}
231+
{{ server['custom_directives'] }}
232232
{% endfor %}
233233
{% endif %}
234234
{% if server['locations'] is defined %}
@@ -358,7 +358,7 @@ server {
358358
{{ directive }}
359359
{% endfilter %}
360360
{% else %}
361-
{{ location['custom_directive'] }}
361+
{{ location['custom_directives'] }}
362362
{% endfor %}
363363
{% endif %}
364364

0 commit comments

Comments
 (0)