From 1593e49f086e50f4d3ace47a98ac815c3d38ee15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Ceslav=20Przywara?= Date: Sun, 26 Nov 2017 19:07:03 +0100 Subject: [PATCH] Gzip files also don't need to be compressed --- global/server/static-files.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/global/server/static-files.conf b/global/server/static-files.conf index 6f0b7f1..29a1a74 100644 --- a/global/server/static-files.conf +++ b/global/server/static-files.conf @@ -9,13 +9,13 @@ location ~* \.(?:rss|atom)$ { } # Caches images, icons, video, audio, HTC, etc. -location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ { +location ~* \.(?:jpg|jpeg|gif|png|ico|cur|svg|mp4|ogg|ogv|webm|htc)$ { add_header Cache-Control "max-age=31536000"; access_log off; } -# Cache svgz files, but don't compress them. -location ~* \.svgz$ { +# Cache gz and svgz files, but don't compress them. +location ~* \.(?:gz|svgz)$ { add_header Cache-Control "max-age=31536000"; access_log off; gzip off; @@ -37,4 +37,4 @@ location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { location = /robots.txt { access_log off; log_not_found off; -} \ No newline at end of file +}