Support brotli compression
This commit is contained in:
parent
4140078c40
commit
0b6c7e1755
|
@ -49,7 +49,21 @@
|
|||
- install
|
||||
- reconfigure
|
||||
|
||||
- name: Install Nginx and dependencies
|
||||
- name: Install Nginx brotli and dependencies
|
||||
apt:
|
||||
pkg: "{{item}}"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
with_items:
|
||||
- libnginx-mod-http-brotli-static
|
||||
- libnginx-mod-http-brotli-filter
|
||||
when: nginx_brotli is defined
|
||||
tags:
|
||||
- install
|
||||
- reconfigure
|
||||
|
||||
|
||||
- name: Install Nginx modsecurity and dependencies
|
||||
apt:
|
||||
pkg: "{{item}}"
|
||||
state: latest
|
||||
|
|
|
@ -77,25 +77,27 @@ http {
|
|||
font/opentype
|
||||
image/svg+xml;
|
||||
|
||||
# brotli on;
|
||||
# brotli_static on;
|
||||
# brotli_buffers 16 8k;
|
||||
# brotli_comp_level 6;
|
||||
# brotli_types
|
||||
# text/css
|
||||
# text/javascript
|
||||
# text/xml
|
||||
# text/plain
|
||||
# text/x-component
|
||||
# application/javascript
|
||||
# application/x-javascript
|
||||
# application/json
|
||||
# application/xml
|
||||
# application/rss+xml
|
||||
# application/vnd.ms-fontobject
|
||||
# font/truetype
|
||||
# font/opentype
|
||||
# image/svg+xml;
|
||||
{% if nginx_brotli is defined %}
|
||||
brotli on;
|
||||
brotli_static on;
|
||||
brotli_buffers 16 8k;
|
||||
brotli_comp_level 6;
|
||||
brotli_types
|
||||
text/css
|
||||
text/javascript
|
||||
text/xml
|
||||
text/plain
|
||||
text/x-component
|
||||
application/javascript
|
||||
application/x-javascript
|
||||
application/json
|
||||
application/xml
|
||||
application/rss+xml
|
||||
application/vnd.ms-fontobject
|
||||
font/truetype
|
||||
font/opentype
|
||||
image/svg+xml;
|
||||
{% endif %}
|
||||
|
||||
{% if nginx_modsecurity is defined %}
|
||||
modsecurity on;
|
||||
|
|
Loading…
Reference in New Issue