Skip to content

Commit b9f2ce2

Browse files
committed
Fix loading of .woff2 files in .htaccess
Signed-off-by: Julius Härtl <[email protected]>
1 parent 8bf7ec2 commit b9f2ce2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.htaccess

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</FilesMatch>
2727

2828
# Let browsers cache WOFF files for a week
29-
<FilesMatch "\.woff$">
29+
<FilesMatch "\.woff2?$">
3030
Header set Cache-Control "max-age=604800"
3131
</FilesMatch>
3232
</IfModule>

lib/private/Setup.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public static function updateHtaccess() {
504504
$content .= "\n Options -MultiViews";
505505
$content .= "\n RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]";
506506
$content .= "\n RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]";
507-
$content .= "\n RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$";
507+
$content .= "\n RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg)$";
508508
$content .= "\n RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$";
509509
$content .= "\n RewriteCond %{REQUEST_FILENAME} !core/img/manifest.json$";
510510
$content .= "\n RewriteCond %{REQUEST_FILENAME} !/remote.php";

0 commit comments

Comments
 (0)