Add support for ".woff2" resources

Summary: Ref T7210. Not sure if this fixes things, but it's definitely //an// issue.

Test Plan:
  - Not able to reproduce issue locally yet.
  - These get into the map now, at least?
  - Saw `.woff2` URIs transform in CSS.
  - Loaded a `.woff2` file.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T7210

Differential Revision: https://secure.phabricator.com/D11720
This commit is contained in:
epriestley
2015-02-09 08:12:47 -08:00
parent 74b860519d
commit e7c2754b69
3 changed files with 13 additions and 6 deletions

View File

@@ -98,7 +98,7 @@ abstract class CelerityResourceController extends PhabricatorController {
// NOTE: This is a piece of magic required to make WOFF fonts work in
// Firefox. Possibly we should generalize this.
if ($type == 'woff') {
if ($type == 'woff' || $type == 'woff2') {
// We could be more tailored here, but it's not currently trivial to
// generate a comprehensive list of valid origins (an install may have
// arbitrarily many Phame blogs, for example), and we lose nothing by
@@ -118,6 +118,7 @@ abstract class CelerityResourceController extends PhabricatorController {
'jpg' => 'image/jpeg',
'swf' => 'application/x-shockwave-flash',
'woff' => 'font/woff',
'woff2' => 'font/woff2',
'eot' => 'font/eot',
'ttf' => 'font/ttf',
);