You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2017/12/02 22:21:28 UTC

svn commit: r1816992 - /httpd/httpd/trunk/docs/manual/mod/mod_brotli.xml

Author: rbowen
Date: Sat Dec  2 22:21:28 2017
New Revision: 1816992

URL: http://svn.apache.org/viewvc?rev=1816992&view=rev
Log:
Remove duplication in Rewrite ruleset for pre-compressed content.

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_brotli.xml

Modified: httpd/httpd/trunk/docs/manual/mod/mod_brotli.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_brotli.xml?rev=1816992&r1=1816991&r2=1816992&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_brotli.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_brotli.xml Sat Dec  2 22:21:28 2017
@@ -142,18 +142,11 @@ content</title>
 
     <highlight language="config">
 &lt;IfModule mod_headers.c&gt;
-    # Serve brotli compressed CSS files if they exist
+    # Serve brotli compressed CSS and JS files if they exist
     # and the client accepts brotli.
     RewriteCond "%{HTTP:Accept-encoding}" "br"
     RewriteCond "%{REQUEST_FILENAME}\.br" "-s"
-    RewriteRule "^(.*)\.css"              "$1\.css\.br" [QSA]
-
-    # Serve brotli compressed JS files if they exist
-    # and the client accepts brotli.
-    RewriteCond "%{HTTP:Accept-encoding}" "br"
-    RewriteCond "%{REQUEST_FILENAME}\.br" "-s"
-    RewriteRule "^(.*)\.js"               "$1\.js\.br" [QSA]
-
+    RewriteRule "^(.*)\.(js|css)"              "$1\.$2\.br" [QSA]
 
     # Serve correct content types, and prevent double compression.
     RewriteRule "\.css\.br$" "-" [T=text/css,E=no-brotli:1]