mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 05:42:40 +01:00
Probably fix cross-origin font requests in IE
Summary: Ref T8013. Test Plan: no u Reviewers: chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T8013 Differential Revision: https://secure.phabricator.com/D12684
This commit is contained in:
parent
15ebb81495
commit
1ab919544c
1 changed files with 9 additions and 2 deletions
|
@ -101,8 +101,15 @@ abstract class CelerityResourceController extends PhabricatorController {
|
||||||
$response->setMimeType($type_map[$type]);
|
$response->setMimeType($type_map[$type]);
|
||||||
|
|
||||||
// NOTE: This is a piece of magic required to make WOFF fonts work in
|
// NOTE: This is a piece of magic required to make WOFF fonts work in
|
||||||
// Firefox. Possibly we should generalize this.
|
// Firefox and IE. Possibly we should generalize this more.
|
||||||
if ($type == 'woff' || $type == 'woff2') {
|
|
||||||
|
$cross_origin_types = array(
|
||||||
|
'woff' => true,
|
||||||
|
'woff2' => true,
|
||||||
|
'eot' => true,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isset($cross_origin_types[$type])) {
|
||||||
// We could be more tailored here, but it's not currently trivial to
|
// We could be more tailored here, but it's not currently trivial to
|
||||||
// generate a comprehensive list of valid origins (an install may have
|
// generate a comprehensive list of valid origins (an install may have
|
||||||
// arbitrarily many Phame blogs, for example), and we lose nothing by
|
// arbitrarily many Phame blogs, for example), and we lose nothing by
|
||||||
|
|
Loading…
Reference in a new issue