From 0197d56ef138539a0d90d313dddb904c37364b90 Mon Sep 17 00:00:00 2001 From: Luca Racchetti Date: Thu, 21 Mar 2024 16:01:39 +0100 Subject: [PATCH] [4.x] Add support for brotli (#43055) * Add support for brotli Add support for brotli gzip compression in htaccess.txt * fix description fix description Co-authored-by: Brian Teeman --------- Co-authored-by: Brian Teeman --- htaccess.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htaccess.txt b/htaccess.txt index a84c35c1414..34c08a2902a 100644 --- a/htaccess.txt +++ b/htaccess.txt @@ -136,7 +136,7 @@ Options -Indexes -## GZIP +## GZIP & BROTLI ## These directives are only enabled if the Apache mod_headers module is enabled. ## This section will check if a .gz file exists and if so will stream it ## directly or fallback to gzip any asset on the fly @@ -157,9 +157,9 @@ Options -Indexes RewriteCond "%{REQUEST_FILENAME}\.gz" -s RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA] - # Serve correct content types, and prevent mod_deflate double gzip. - RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1] - RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1] + # Serve correct content types, and prevent mod_deflate double compression. + RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1,E=no-brotli:1] + RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1] # Serve correct encoding type.