diff --git a/CHANGELOG.md b/CHANGELOG.md index f1722d5..2295fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### v3.9.x - [Unreleased] +#### Added + +- Allow web browser caching for json and webmanifest files +- nginx-core.mustache template used to render nginx.conf during stack setup + #### Changed - Do not force Nginx upgrade if a custom Nginx package compiled with nginx-ee is detected - Gzip enabled again by default with configuration in /etc/nginx/conf.d/gzip.conf - Brotli configuration moved in /etc/nginx/conf.d/brotli.conf (easier to disable in case of issues) - Moving package configuration in a new plugin stack_pref.py +- Cleanup templates by removing all doublons (with/without php7) and replacing them with variables ### v3.9.7.2 - 2019-08-12 diff --git a/wo/cli/templates/brotli.mustache b/wo/cli/templates/brotli.mustache index 7dc08c7..6a8ae82 100644 --- a/wo/cli/templates/brotli.mustache +++ b/wo/cli/templates/brotli.mustache @@ -5,7 +5,6 @@ brotli on; brotli_static on; brotli_buffers 16 8k; - brotli_min_length 64000; brotli_comp_level 4; brotli_types application/atom+xml diff --git a/wo/cli/templates/fail2ban-forbidden.mustache b/wo/cli/templates/fail2ban-forbidden.mustache index 6f708bf..6488363 100644 --- a/wo/cli/templates/fail2ban-forbidden.mustache +++ b/wo/cli/templates/fail2ban-forbidden.mustache @@ -1,4 +1,3 @@ [Definition] failregex = ^ \[error\] \d+#\d+: .* forbidden .*, client: , .*$ - ignoreregex = diff --git a/wo/cli/templates/gzip.mustache b/wo/cli/templates/gzip.mustache index 62b60ed..144b5be 100644 --- a/wo/cli/templates/gzip.mustache +++ b/wo/cli/templates/gzip.mustache @@ -2,29 +2,29 @@ # Gzip Settings ## - gzip on; - gzip_disable "msie6"; + gzip on; + gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_types - application/atom+xml - application/javascript - application/json - application/rss+xml - application/vnd.ms-fontobject - application/x-font-ttf - application/x-web-app-manifest+json - application/xhtml+xml - application/xml - font/opentype - image/svg+xml - image/x-icon - text/css - text/plain - text/x-component - text/xml - text/javascript; \ No newline at end of file + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.1; + gzip_types + application/atom+xml + application/javascript + application/json + application/rss+xml + application/vnd.ms-fontobject + application/x-font-ttf + application/x-web-app-manifest+json + application/xhtml+xml + application/xml + font/opentype + image/svg+xml + image/x-icon + text/css + text/plain + text/x-component + text/xml + text/javascript; \ No newline at end of file diff --git a/wo/cli/templates/locations.mustache b/wo/cli/templates/locations.mustache index f944a40..5773adc 100644 --- a/wo/cli/templates/locations.mustache +++ b/wo/cli/templates/locations.mustache @@ -7,35 +7,11 @@ location = /favicon.ico { expires max; } # Cache static files -location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|ttf|m4a|mp4|ttf|rss|atom|jpe?g|gif|cur|heic|png|tiff|ico|webm|mp3|aac|tgz|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf|webp|json)$ { +location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|ttf|m4a|mp4|ttf|rss|atom|jpe?g|gif|cur|heic|png|tiff|ico|webm|mp3|aac|tgz|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf|webp|json|webmanifest)$ { add_header "Access-Control-Allow-Origin" "*"; access_log off; log_not_found off; expires max; - gzip on; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_types - application/atom+xml - application/javascript - application/json - application/rss+xml - application/vnd.ms-fontobject - application/x-font-ttf - application/x-web-app-manifest+json - application/xhtml+xml - application/xml - font/opentype - image/svg+xml - image/x-icon - text/css - text/plain - text/x-component - text/xml - text/javascript; } # Cache css & js files location ~* \.(?:css(\.map)?|js(\.map)?)$ { @@ -43,30 +19,6 @@ location ~* \.(?:css(\.map)?|js(\.map)?)$ { access_log off; log_not_found off; expires 30d; - gzip on; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_types - application/atom+xml - application/javascript - application/json - application/rss+xml - application/vnd.ms-fontobject - application/x-font-ttf - application/x-web-app-manifest+json - application/xhtml+xml - application/xml - font/opentype - image/svg+xml - image/x-icon - text/css - text/plain - text/x-component - text/xml - text/javascript; } # Security settings for better privacy # Deny hidden files