ansible-roles/roles/nginx/templates/ansible_conf.d/09-cacheable.conf.j2

28 lines
997 B
Plaintext
Raw Normal View History

2022-02-09 14:00:12 +01:00
map $sent_http_content_type $is_client_cacheable {
2021-12-01 19:13:34 +01:00
default 0;
~image/ 1;
~audio/ 1;
~video/ 1;
text/css 1;
application/javascript 1;
application/x-javascript 1;
application/pdf 1;
application/font-sfnt 1;
font/ttf 1;
font/opentype 1;
2022-02-09 17:00:06 +01:00
font/woff 1;
2022-02-09 15:00:05 +01:00
font/woff2 1;
2021-12-01 19:13:34 +01:00
application/font-woff 1;
application/vnd.ms-fontobject 1;
application/vnd.ms-opentype 1;
}
2022-02-09 14:00:12 +01:00
map $request_uri $is_proxy_cacheable {
default 0;
~*\.(png|jpe?g|bmp|gif|webp)$ 1;
~*\.(js|css|txt)$ 1;
~*\.(pdf)$ 1;
2022-02-09 17:00:06 +01:00
~*\.(ttf|ott|woff?2)$ 1;
2022-02-09 14:00:12 +01:00
~*\.(mp3|mp4|avi|mpe?g|mov|flv)$ 1;
}