]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix loading of .woff2 files in .htaccess 12518/head
authorJulius Härtl <jus@bitgrid.net>
Sun, 18 Nov 2018 10:02:20 +0000 (11:02 +0100)
committerJulius Härtl <jus@bitgrid.net>
Sun, 18 Nov 2018 10:02:20 +0000 (11:02 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
.htaccess
lib/private/Setup.php

index 81a53f9989ec920c22be76dbc3f903dead0831bb..63d50a2b9d7e30ba5e9c151d0cf2451658fcff3d 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -26,7 +26,7 @@
   </FilesMatch>
 
   # Let browsers cache WOFF files for a week
-  <FilesMatch "\.woff$">
+  <FilesMatch "\.woff2?$">
     Header set Cache-Control "max-age=604800"
   </FilesMatch>
 </IfModule>
index 7e235d03fdca4eee9c8251d87cd5b3c43ecf7eeb..0278191587ace84d127d24ab0b685eb439c38746 100644 (file)
@@ -504,7 +504,7 @@ class Setup {
                        $content .= "\n  Options -MultiViews";
                        $content .= "\n  RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]";
                        $content .= "\n  RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]";
-                       $content .= "\n  RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$";
+                       $content .= "\n  RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg)$";
                        $content .= "\n  RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$";
                        $content .= "\n  RewriteCond %{REQUEST_FILENAME} !core/img/manifest.json$";
                        $content .= "\n  RewriteCond %{REQUEST_FILENAME} !/remote.php";