add server.add_headers option
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
bff417a33a
commit
00f7bd4076
@ -159,14 +159,15 @@ nginx_vhosts_default:
|
|||||||
# dhparam:
|
# dhparam:
|
||||||
# client_max_body_size:
|
# client_max_body_size:
|
||||||
# send_timeout:
|
# send_timeout:
|
||||||
|
# add_headers:
|
||||||
|
# - name:
|
||||||
|
# value:
|
||||||
|
# always: True
|
||||||
# locations:
|
# locations:
|
||||||
# - match: /
|
# - match: /
|
||||||
# root: /var/www/vhosts/default
|
# root: /var/www/vhosts/default
|
||||||
# index: index.html
|
# index: index.html
|
||||||
# add_headers:
|
# add_headers: []
|
||||||
# - name:
|
|
||||||
# value:
|
|
||||||
# always: True
|
|
||||||
# proxy_pass:
|
# proxy_pass:
|
||||||
# proxy_http_version: "1.1"
|
# proxy_http_version: "1.1"
|
||||||
# proxy_buffering: "off"
|
# proxy_buffering: "off"
|
||||||
|
@ -37,6 +37,13 @@ server {
|
|||||||
{% if server.send_timeout is defined and server.send_timeout %}
|
{% if server.send_timeout is defined and server.send_timeout %}
|
||||||
send_timeout {{ server.send_timeout }};
|
send_timeout {{ server.send_timeout }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if server.add_headers is defined and server.add_headers %}
|
||||||
|
|
||||||
|
include /etc/nginx/conf.d/header.conf;
|
||||||
|
{% for add in server.add_headers %}
|
||||||
|
add_header {{ add.name }} {{ add.value }}{{ " always" if add.always | default(True) | bool else "" }};
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% if server.custom_options is defined and server.custom_options %}
|
{% if server.custom_options is defined and server.custom_options %}
|
||||||
|
|
||||||
{% for inline_option in server.custom_options %}
|
{% for inline_option in server.custom_options %}
|
||||||
|
Loading…
Reference in New Issue
Block a user