Changeset View
Changeset View
Standalone View
Standalone View
src/applications/celerity/controller/CelerityResourceController.php
| Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | if ($data === null) { | ||||
| $data = $xformer->transformResource($path, $data); | $data = $xformer->transformResource($path, $data); | ||||
| } | } | ||||
| if ($cache) { | if ($cache) { | ||||
| $cache->setKey($cache_key, $data); | $cache->setKey($cache_key, $data); | ||||
| } | } | ||||
| } | } | ||||
| $response = new AphrontFileResponse(); | $response = id(new AphrontFileResponse()) | ||||
| $response->setContent($data); | ->setContent($data) | ||||
| $response->setMimeType($type_map[$type]); | ->setMimeType($type_map[$type]) | ||||
| ->setCompressResponse(true); | |||||
| // 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 and IE. Possibly we should generalize this more. | // Firefox and IE. Possibly we should generalize this more. | ||||
| $cross_origin_types = array( | $cross_origin_types = array( | ||||
| 'woff' => true, | 'woff' => true, | ||||
| 'woff2' => true, | 'woff2' => true, | ||||
| 'eot' => true, | 'eot' => true, | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||