nginx: add headers_more support (#2845)

This commit is contained in:
kulikov-a 2022-05-12 17:02:16 +03:00 committed by GitHub
parent 10aee293e8
commit 8a4cd2b7c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -53,6 +53,12 @@
<type>text</type>
<advanced>true</advanced>
</field>
<field>
<id>nginx.http.headers_more_enable</id>
<label>Enable Headers More module</label>
<type>checkbox</type>
<help>Enhanced version of the standard headers module. Allows to add, set, or clear any output or input header.</help>
</field>
</subtab>
<subtab id="nginx-general-webgui" description="GUI Settings">
<field>

View File

@ -47,6 +47,9 @@
<Required>N</Required>
<MinimumValue>1</MinimumValue>
</server_names_hash_max_size>
<headers_more_enable type="BooleanField">
<Required>N</Required>
</headers_more_enable>
</http>
<userlist type="ArrayField">

View File

@ -5,6 +5,9 @@ load_module /usr/local/libexec/nginx/ngx_mail_module.so;
load_module /usr/local/libexec/nginx/ngx_http_brotli_filter_module.so;
load_module /usr/local/libexec/nginx/ngx_http_brotli_static_module.so;
load_module /usr/local/libexec/nginx/ngx_http_js_module.so;
{% if OPNsense.Nginx.http.headers_more_enable is defined and OPNsense.Nginx.http.headers_more_enable == '1' %}
load_module /usr/local/libexec/nginx/ngx_http_headers_more_filter_module.so;
{% endif %}
user www staff;
worker_processes {{ OPNsense.Nginx.http.workerprocesses }};