Skip to content

Commit

Permalink
SVGZ files are already compressed
Browse files Browse the repository at this point in the history
Disable gzip function for them
Regression d2f4e5c
  • Loading branch information
LeoColomb committed Mar 9, 2019
1 parent 3b0c4c4 commit cec616a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions h5bp/location/web_performance_svgz-compression.conf
Original file line number Diff line number Diff line change
@@ -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;
}
1 change: 1 addition & 0 deletions test/vhosts/server.localhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cec616a

Please sign in to comment.