Skip to content

Commit

Permalink
Merge #4356 branch 'Guisardo-fix-cors-woff2' into develop
Browse files Browse the repository at this point in the history
* Guisardo-fix-cors-woff2:
  // CORE: Fix mime types for Woff
  // CORE: Added cors for woff2 file extension .htaccess FileMatch
  • Loading branch information
julienbourdeau committed Oct 30, 2015
2 parents 9879df5 + ae1c350 commit a36c389
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/Tools.php
Expand Up @@ -2440,9 +2440,10 @@ public static function generateHtaccess($path = null, $rewrite_settings = null,
fwrite($write_fd, "AddType application/vnd.ms-fontobject .eot\n");
fwrite($write_fd, "AddType font/ttf .ttf\n");
fwrite($write_fd, "AddType font/otf .otf\n");
fwrite($write_fd, "AddType application/x-font-woff .woff\n");
fwrite($write_fd, "AddType application/font-woff .woff\n");
fwrite($write_fd, "AddType application/font-woff2 .woff2\n");
fwrite($write_fd, "<IfModule mod_headers.c>
<FilesMatch \"\.(ttf|ttc|otf|eot|woff|svg)$\">
<FilesMatch \"\.(ttf|ttc|otf|eot|woff|woff2|svg)$\">
Header add Access-Control-Allow-Origin \"*\"
</FilesMatch>
</IfModule>\n\n");
Expand All @@ -2462,6 +2463,7 @@ public static function generateHtaccess($path = null, $rewrite_settings = null,
ExpiresByType image/svg+xml \"access plus 1 year\"
ExpiresByType image/vnd.microsoft.icon \"access plus 1 year\"
ExpiresByType application/font-woff \"access plus 1 year\"
ExpiresByType application/font-woff2 \"access plus 1 year\"
ExpiresByType application/x-font-woff \"access plus 1 year\"
ExpiresByType application/vnd.ms-fontobject \"access plus 1 year\"
ExpiresByType font/opentype \"access plus 1 year\"
Expand Down

1 comment on commit a36c389

@mortenborg
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has support for .woff2 ever been implemented? I still see no support for .woff2 in the latest 1.6.1.12 version?

Please sign in to comment.