Add implementation of ngx_http_sub_module config (#216)
This commit is contained in:
parent
9fba82755f
commit
5ac87644a8
@ -41,6 +41,11 @@ nginx_main_template:
|
|||||||
keyval: false
|
keyval: false
|
||||||
# server_tokens: "off"
|
# server_tokens: "off"
|
||||||
http_global_autoindex: false
|
http_global_autoindex: false
|
||||||
|
sub_filter:
|
||||||
|
# sub_filters: []
|
||||||
|
last_modified: "off"
|
||||||
|
once: "on"
|
||||||
|
types: "text/html"
|
||||||
# http_custom_options: []
|
# http_custom_options: []
|
||||||
stream_enable: false
|
stream_enable: false
|
||||||
# stream_custom_options: []
|
# stream_custom_options: []
|
||||||
@ -109,6 +114,11 @@ nginx_http_template:
|
|||||||
trusted_cert: /etc/ssl/certs/root_CA_cert_plus_intermediates.crt
|
trusted_cert: /etc/ssl/certs/root_CA_cert_plus_intermediates.crt
|
||||||
stapling: true
|
stapling: true
|
||||||
stapling_verify: true
|
stapling_verify: true
|
||||||
|
sub_filter:
|
||||||
|
# sub_filters: []
|
||||||
|
last_modified: "off"
|
||||||
|
once: "on"
|
||||||
|
types: "text/html"
|
||||||
# custom_options: []
|
# custom_options: []
|
||||||
web_server:
|
web_server:
|
||||||
locations:
|
locations:
|
||||||
@ -140,6 +150,11 @@ nginx_http_template:
|
|||||||
# return302:
|
# return302:
|
||||||
# code: 302
|
# code: 302
|
||||||
# url: https://sso.somehost.local/?url=https://$http_host$request_uri
|
# url: https://sso.somehost.local/?url=https://$http_host$request_uri
|
||||||
|
sub_filter:
|
||||||
|
# sub_filters: []
|
||||||
|
last_modified: "off"
|
||||||
|
once: "on"
|
||||||
|
types: "text/html"
|
||||||
# custom_options: []
|
# custom_options: []
|
||||||
http_demo_conf: false
|
http_demo_conf: false
|
||||||
reverse_proxy:
|
reverse_proxy:
|
||||||
@ -236,6 +251,11 @@ nginx_http_template:
|
|||||||
# return302:
|
# return302:
|
||||||
# code: 302
|
# code: 302
|
||||||
# url: https://sso.somehost.local/?url=https://$http_host$request_uri
|
# url: https://sso.somehost.local/?url=https://$http_host$request_uri
|
||||||
|
sub_filter:
|
||||||
|
# sub_filters: []
|
||||||
|
last_modified: "off"
|
||||||
|
once: "on"
|
||||||
|
types: "text/html"
|
||||||
# custom_options: []
|
# custom_options: []
|
||||||
health_check_plus: false
|
health_check_plus: false
|
||||||
returns:
|
returns:
|
||||||
|
@ -33,6 +33,11 @@
|
|||||||
rate_limit: false
|
rate_limit: false
|
||||||
keyval: false
|
keyval: false
|
||||||
server_tokens: "off"
|
server_tokens: "off"
|
||||||
|
sub_filter:
|
||||||
|
# sub_filters: []
|
||||||
|
last_modified: "off"
|
||||||
|
once: "on"
|
||||||
|
types: "text/html"
|
||||||
stream_enable: true
|
stream_enable: true
|
||||||
http_global_autoindex: false
|
http_global_autoindex: false
|
||||||
|
|
||||||
@ -60,6 +65,12 @@
|
|||||||
name: Strict-Transport-Security
|
name: Strict-Transport-Security
|
||||||
value: max-age=15768000; includeSubDomains
|
value: max-age=15768000; includeSubDomains
|
||||||
always: true
|
always: true
|
||||||
|
sub_filter:
|
||||||
|
# sub_filters: []
|
||||||
|
last_modified: "off"
|
||||||
|
once: "on"
|
||||||
|
types: "text/html"
|
||||||
|
# custom_options: []
|
||||||
reverse_proxy:
|
reverse_proxy:
|
||||||
locations:
|
locations:
|
||||||
frontend:
|
frontend:
|
||||||
@ -109,6 +120,11 @@
|
|||||||
value: $scheme
|
value: $scheme
|
||||||
proxy_buffering: false
|
proxy_buffering: false
|
||||||
client_max_body_size: 5m
|
client_max_body_size: 5m
|
||||||
|
sub_filter:
|
||||||
|
# sub_filters: []
|
||||||
|
last_modified: "off"
|
||||||
|
once: "on"
|
||||||
|
types: "text/html"
|
||||||
backend:
|
backend:
|
||||||
location: /backend
|
location: /backend
|
||||||
proxy_pass: http://backend_servers/
|
proxy_pass: http://backend_servers/
|
||||||
@ -212,6 +228,21 @@
|
|||||||
server_name: localhost
|
server_name: localhost
|
||||||
error_page: /usr/share/nginx/html
|
error_page: /usr/share/nginx/html
|
||||||
autoindex: false
|
autoindex: false
|
||||||
|
sub_filter:
|
||||||
|
sub_filters:
|
||||||
|
- "'server_hostname' '$hostname'"
|
||||||
|
- "'server_address' '$server_addr:$server_port'"
|
||||||
|
- "'server_url' '$request_uri'"
|
||||||
|
- "'remote_addr' '$remote_addr:$remote_port'"
|
||||||
|
- "'server_date' '$time_local'"
|
||||||
|
- "'client_browser' '$http_user_agent'"
|
||||||
|
- "'request_id' '$request_id'"
|
||||||
|
- "'nginx_version' '$nginx_version'"
|
||||||
|
- "'document_root' '$document_root'"
|
||||||
|
- "'proxied_for_ip' '$http_x_forwarded_for'"
|
||||||
|
last_modified: "off"
|
||||||
|
once: "off"
|
||||||
|
types: "text/html"
|
||||||
web_server:
|
web_server:
|
||||||
locations:
|
locations:
|
||||||
frontend_site:
|
frontend_site:
|
||||||
@ -221,7 +252,12 @@
|
|||||||
html_file_location: /usr/share/nginx/html
|
html_file_location: /usr/share/nginx/html
|
||||||
html_file_name: frontend_index.html
|
html_file_name: frontend_index.html
|
||||||
autoindex: false
|
autoindex: false
|
||||||
http_demo_conf: true
|
sub_filter:
|
||||||
|
# sub_filters: []
|
||||||
|
last_modified: "off"
|
||||||
|
once: "off"
|
||||||
|
types: "text/html"
|
||||||
|
http_demo_conf: false
|
||||||
backend:
|
backend:
|
||||||
template_file: http/default.conf.j2
|
template_file: http/default.conf.j2
|
||||||
conf_file_name: backend_default.conf
|
conf_file_name: backend_default.conf
|
||||||
@ -235,6 +271,21 @@
|
|||||||
server_name: localhost
|
server_name: localhost
|
||||||
error_page: /usr/share/nginx/html
|
error_page: /usr/share/nginx/html
|
||||||
autoindex: false
|
autoindex: false
|
||||||
|
sub_filter:
|
||||||
|
sub_filters:
|
||||||
|
- "'server_hostname' '$hostname'"
|
||||||
|
- "'server_address' '$server_addr:$server_port'"
|
||||||
|
- "'server_url' '$request_uri'"
|
||||||
|
- "'remote_addr' '$remote_addr:$remote_port'"
|
||||||
|
- "'server_date' '$time_local'"
|
||||||
|
- "'client_browser' '$http_user_agent'"
|
||||||
|
- "'request_id' '$request_id'"
|
||||||
|
- "'nginx_version' '$nginx_version'"
|
||||||
|
- "'document_root' '$document_root'"
|
||||||
|
- "'proxied_for_ip' '$http_x_forwarded_for'"
|
||||||
|
last_modified: "off"
|
||||||
|
once: "off"
|
||||||
|
types: "text/html"
|
||||||
web_server:
|
web_server:
|
||||||
locations:
|
locations:
|
||||||
backend_site:
|
backend_site:
|
||||||
@ -252,7 +303,12 @@
|
|||||||
- 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
|
||||||
http_demo_conf: true
|
sub_filter:
|
||||||
|
# sub_filters: []
|
||||||
|
last_modified: "off"
|
||||||
|
once: "off"
|
||||||
|
types: "text/html"
|
||||||
|
http_demo_conf: false
|
||||||
nginx_html_demo_template_enable: true
|
nginx_html_demo_template_enable: true
|
||||||
nginx_html_demo_template:
|
nginx_html_demo_template:
|
||||||
frontend:
|
frontend:
|
||||||
|
@ -159,6 +159,20 @@ server {
|
|||||||
{% if item.value.servers[server].client_max_body_size is defined and item.value.servers[server].client_max_body_size %}
|
{% if item.value.servers[server].client_max_body_size is defined and item.value.servers[server].client_max_body_size %}
|
||||||
client_max_body_size {{ item.value.servers[server].client_max_body_size }};
|
client_max_body_size {{ item.value.servers[server].client_max_body_size }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].sub_filter.sub_filters is defined and item.value.servers[server].sub_filter.sub_filters | length %}
|
||||||
|
{% for sub_filter in item.value.servers[server].sub_filter.sub_filters %}
|
||||||
|
sub_filter {{ sub_filter }};
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].sub_filter.last_modified is defined %}
|
||||||
|
sub_filter_last_modified {{ item.value.servers[server].sub_filter.last_modified | ternary("on", "off") }};
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].sub_filter.once is defined %}
|
||||||
|
sub_filter_once {{ item.value.servers[server].sub_filter.once | ternary("on", "off") }};
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].sub_filter.types is defined and item.value.servers[server].sub_filter.types %}
|
||||||
|
sub_filter_types {{ item.value.servers[server].sub_filter.types }};
|
||||||
|
{% 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 }};
|
||||||
@ -334,6 +348,20 @@ server {
|
|||||||
{% if item.value.servers[server].reverse_proxy.locations[location].proxy_buffering is defined %}
|
{% if item.value.servers[server].reverse_proxy.locations[location].proxy_buffering is defined %}
|
||||||
proxy_buffering {{ item.value.servers[server].reverse_proxy.locations[location].proxy_buffering | ternary("on", "off") }};
|
proxy_buffering {{ item.value.servers[server].reverse_proxy.locations[location].proxy_buffering | ternary("on", "off") }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].reverse_proxy.locations[location].sub_filter.sub_filters is defined and item.value.servers[server].reverse_proxy.locations[location].sub_filter.sub_filters | length %}
|
||||||
|
{% for sub_filter in item.value.servers[server].reverse_proxy.locations[location].sub_filter.sub_filters %}
|
||||||
|
sub_filter {{ sub_filter }};
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].reverse_proxy.locations[location].sub_filter.last_modified is defined %}
|
||||||
|
sub_filter_last_modified {{ item.value.servers[server].reverse_proxy.locations[location].sub_filter.last_modified | ternary("on", "off") }};
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].reverse_proxy.locations[location].sub_filter.once is defined %}
|
||||||
|
sub_filter_once {{ item.value.servers[server].reverse_proxy.locations[location].sub_filter.once | ternary("on", "off") }};
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].reverse_proxy.locations[location].sub_filter.types is defined and item.value.servers[server].reverse_proxy.locations[location].sub_filter.types %}
|
||||||
|
sub_filter_types {{ item.value.servers[server].reverse_proxy.locations[location].sub_filter.types }};
|
||||||
|
{% 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 }};
|
||||||
@ -403,6 +431,20 @@ server {
|
|||||||
{% if item.value.servers[server].web_server.locations[location].auth_request_set is defined %}
|
{% if item.value.servers[server].web_server.locations[location].auth_request_set is defined %}
|
||||||
auth_request_set {{ item.value.servers[server].web_server.locations[location].auth_request_set.name }} {{ item.value.servers[server].web_server.locations[location].auth_request_set.value }};
|
auth_request_set {{ item.value.servers[server].web_server.locations[location].auth_request_set.name }} {{ item.value.servers[server].web_server.locations[location].auth_request_set.value }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].web_server.locations[location].sub_filter.sub_filters is defined and item.value.servers[server].web_server.locations[location].sub_filter.sub_filters | length %}
|
||||||
|
{% for sub_filter in item.value.servers[server].web_server.locations[location].sub_filter.sub_filters %}
|
||||||
|
sub_filter {{ sub_filter }};
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].web_server.locations[location].sub_filter.last_modified is defined %}
|
||||||
|
sub_filter_last_modified {{ item.value.servers[server].web_server.locations[location].sub_filter.last_modified | ternary("on", "off") }};
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].web_server.locations[location].sub_filter.once is defined %}
|
||||||
|
sub_filter_once {{ item.value.servers[server].web_server.locations[location].sub_filter.once | ternary("on", "off") }};
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.servers[server].web_server.locations[location].sub_filter.types is defined and item.value.servers[server].web_server.locations[location].sub_filter.types %}
|
||||||
|
sub_filter_types {{ item.value.servers[server].web_server.locations[location].sub_filter.types }};
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -99,6 +99,20 @@ http {
|
|||||||
{% if nginx_main_template.http_global_autoindex | default(false) %}
|
{% if nginx_main_template.http_global_autoindex | default(false) %}
|
||||||
autoindex on;
|
autoindex on;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if nginx_main_template.sub_filter.sub_filters is defined and nginx_main_template.sub_filter.sub_filters | length %}
|
||||||
|
{% for sub_filter in nginx_main_template.sub_filter.sub_filters %}
|
||||||
|
sub_filter {{ sub_filter }};
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if nginx_main_template.sub_filter.last_modified is defined %}
|
||||||
|
sub_filter_last_modified {{ nginx_main_template.sub_filter.last_modified | ternary("on", "off") }};
|
||||||
|
{% endif %}
|
||||||
|
{% if nginx_main_template.sub_filter.once is defined %}
|
||||||
|
sub_filter_once {{ nginx_main_template.sub_filter.once | ternary("on", "off") }};
|
||||||
|
{% endif %}
|
||||||
|
{% if nginx_main_template.sub_filter.types is defined and nginx_main_template.sub_filter.types %}
|
||||||
|
sub_filter_types {{ nginx_main_template.sub_filter.types }};
|
||||||
|
{% 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 }};
|
||||||
|
Loading…
Reference in New Issue
Block a user