Remove semicolons from custom_options (#259)

This will fix custom blocks such as `if` blocks not working as intended unless a comment sign is added at the end of each line
This commit is contained in:
Alessandro Fael Garcia 2020-06-09 18:23:38 +02:00 committed by GitHub
parent 55c2f534ef
commit 06b8f5a020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 17 deletions

View File

@ -298,11 +298,11 @@
html_file_location: /usr/share/nginx/html html_file_location: /usr/share/nginx/html
autoindex: false autoindex: false
custom_options: custom_options:
- fastcgi_split_path_info ^(.+\.php)(/.+)$ - fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/run/php/php7.2-fpm.sock - fastcgi_pass unix:/run/php/php7.2-fpm.sock;
- fastcgi_index index.php - fastcgi_index index.php;
- include fastcgi_params - include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
sub_filter: sub_filter:
# sub_filters: [] # sub_filters: []
last_modified: "off" last_modified: "off"

View File

@ -17,7 +17,7 @@ upstream {{ item.value.upstreams[upstream].name }} {
{% endif %} {% endif %}
{% if item.value.upstreams[upstream].custom_options is defined and item.value.upstreams[upstream].custom_options | length %} {% if item.value.upstreams[upstream].custom_options is defined and item.value.upstreams[upstream].custom_options | length %}
{% for inline_option in item.value.upstreams[upstream].custom_options %} {% for inline_option in item.value.upstreams[upstream].custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
} }
@ -72,7 +72,7 @@ auth_request_set {{ item.value.auth_request_set_http.name }} {{ item.value.auth_
{% if item.value.custom_options is defined and item.value.custom_options | length %} {% if item.value.custom_options is defined and item.value.custom_options | length %}
{% for inline_option in item.value.custom_options %} {% for inline_option in item.value.custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -181,7 +181,7 @@ server {
{% endif %} {% endif %}
{% if item.value.servers[server].custom_options is defined and item.value.servers[server].custom_options | length %} {% if item.value.servers[server].custom_options is defined and item.value.servers[server].custom_options | length %}
{% for inline_option in item.value.servers[server].custom_options %} {% for inline_option in item.value.servers[server].custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -370,7 +370,7 @@ server {
{% endif %} {% endif %}
{% if item.value.servers[server].reverse_proxy.locations[location].custom_options is defined and item.value.servers[server].reverse_proxy.locations[location].custom_options | length %} {% if item.value.servers[server].reverse_proxy.locations[location].custom_options is defined and item.value.servers[server].reverse_proxy.locations[location].custom_options | length %}
{% for inline_option in item.value.servers[server].reverse_proxy.locations[location].custom_options %} {% for inline_option in item.value.servers[server].reverse_proxy.locations[location].custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if (item.value.servers[server].reverse_proxy.health_check_plus is defined) and item.value.servers[server].reverse_proxy.health_check_plus %} {% if (item.value.servers[server].reverse_proxy.health_check_plus is defined) and item.value.servers[server].reverse_proxy.health_check_plus %}
@ -403,7 +403,7 @@ server {
{% endif %} {% endif %}
{% if item.value.servers[server].web_server.locations[location].custom_options is defined and item.value.servers[server].web_server.locations[location].custom_options | length %} {% if item.value.servers[server].web_server.locations[location].custom_options is defined and item.value.servers[server].web_server.locations[location].custom_options | length %}
{% for inline_option in item.value.servers[server].web_server.locations[location].custom_options %} {% for inline_option in item.value.servers[server].web_server.locations[location].custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if item.value.servers[server].web_server.locations[location].proxy_hide_headers is defined %} {% if item.value.servers[server].web_server.locations[location].proxy_hide_headers is defined %}

View File

@ -40,7 +40,7 @@ worker_rlimit_nofile {{ nginx_main_template.worker_rlimit_nofile }};
{% if nginx_main_template.custom_options is defined and nginx_main_template.custom_options | length %} {% if nginx_main_template.custom_options is defined and nginx_main_template.custom_options | length %}
{% for inline_option in nginx_main_template.custom_options %} {% for inline_option in nginx_main_template.custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -52,7 +52,7 @@ events {
worker_connections {{ nginx_main_template.worker_connections }}; worker_connections {{ nginx_main_template.worker_connections }};
{% if nginx_main_template.events_custom_options is defined and nginx_main_template.events_custom_options | length %} {% if nginx_main_template.events_custom_options is defined and nginx_main_template.events_custom_options | length %}
{% for inline_option in nginx_main_template.events_custom_options %} {% for inline_option in nginx_main_template.events_custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
} }
@ -115,7 +115,7 @@ http {
{% endif %} {% endif %}
{% if nginx_main_template.http_custom_options is defined and nginx_main_template.http_custom_options | length %} {% if nginx_main_template.http_custom_options is defined and nginx_main_template.http_custom_options | length %}
{% for inline_option in nginx_main_template.http_custom_options %} {% for inline_option in nginx_main_template.http_custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
include /etc/nginx/conf.d/*.conf; include /etc/nginx/conf.d/*.conf;
@ -126,7 +126,7 @@ http {
stream { stream {
{% if nginx_main_template.stream_custom_options is defined and nginx_main_template.stream_custom_options | length %} {% if nginx_main_template.stream_custom_options is defined and nginx_main_template.stream_custom_options | length %}
{% for inline_option in nginx_main_template.stream_custom_options %} {% for inline_option in nginx_main_template.stream_custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
include /etc/nginx/conf.d/stream/*.conf; include /etc/nginx/conf.d/stream/*.conf;

View File

@ -17,7 +17,7 @@ upstream {{ item.value.upstreams[upstream].name }} {
{% endif %} {% endif %}
{% if item.value.upstreams[upstream].custom_options is defined and item.value.upstreams[upstream].custom_options | length %} {% if item.value.upstreams[upstream].custom_options is defined and item.value.upstreams[upstream].custom_options | length %}
{% for inline_option in item.value.upstreams[upstream].custom_options %} {% for inline_option in item.value.upstreams[upstream].custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
} }
@ -26,7 +26,7 @@ upstream {{ item.value.upstreams[upstream].name }} {
{% if item.value.custom_options is defined and item.value.custom_options | length %} {% if item.value.custom_options is defined and item.value.custom_options | length %}
{% for inline_option in item.value.custom_options %} {% for inline_option in item.value.custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -105,7 +105,7 @@ server {
{% endif %} {% endif %}
{% if item.value.network_streams[stream].custom_options is defined and item.value.network_streams[stream].custom_options | length %} {% if item.value.network_streams[stream].custom_options is defined and item.value.network_streams[stream].custom_options | length %}
{% for inline_option in item.value.network_streams[stream].custom_options %} {% for inline_option in item.value.network_streams[stream].custom_options %}
{{ inline_option }}; {{ inline_option }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
} }