From cec616a103345ccef418a16549adee60f650cf52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Colombaro?= Date: Sat, 9 Mar 2019 15:08:44 +0100 Subject: [PATCH] SVGZ files are already compressed Disable gzip function for them Regression d2f4e5c68f03002693b361d40842f6d19964473c --- .../web_performance_svgz-compression.conf | 15 +++++++++++++++ test/vhosts/server.localhost.conf | 1 + 2 files changed, 16 insertions(+) create mode 100644 h5bp/location/web_performance_svgz-compression.conf diff --git a/h5bp/location/web_performance_svgz-compression.conf b/h5bp/location/web_performance_svgz-compression.conf new file mode 100644 index 0000000..53a8b5d --- /dev/null +++ b/h5bp/location/web_performance_svgz-compression.conf @@ -0,0 +1,15 @@ +# ---------------------------------------------------------------------- +# | SVGZ Compression | +# ---------------------------------------------------------------------- + +# SVGZ files are already compressed. +# Disable gzip function for `.svgz` files. + +location ~* \.svgz$ { + gzip off; + add_header Content-Encoding gzip; + + include h5bp/security/x-content-type-options.conf; + include h5bp/web_performance/no-transform.conf; + include h5bp/cross-origin/requests.conf; +} diff --git a/test/vhosts/server.localhost.conf b/test/vhosts/server.localhost.conf index c1e525f..fdbb837 100644 --- a/test/vhosts/server.localhost.conf +++ b/test/vhosts/server.localhost.conf @@ -20,6 +20,7 @@ server { gzip_min_length 1; include h5bp/location/web_performance_filename-based_cache_busting.conf; + include h5bp/location/web_performance_svgz-compression.conf; include h5bp/errors/custom_errors.conf; location ~* /test-pre-gzip {