@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Serve .eot and .ttf through Celerity

Summary:
D9153 fixed half of this, but exposed another issue, which is that we don't actually serve ".eot" and ".ttf" through Celerity right now.

Make sure we include them in the routes.

Test Plan:
- Downloaded CSS, JS, TTF, EOT, WOFF, JPG, etc., through Celerity.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9154

+7 -3
+5 -1
src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
··· 27 27 } 28 28 29 29 protected function getResourceURIMapRules() { 30 + $extensions = CelerityResourceController::getSupportedResourceTypes(); 31 + $extensions = array_keys($extensions); 32 + $extensions = implode('|', $extensions); 33 + 30 34 return array( 31 35 '/res/' => array( 32 36 '(?:(?P<mtime>[0-9]+)T/)?'. 33 37 '(?P<library>[^/]+)/'. 34 38 '(?P<hash>[a-f0-9]{8})/'. 35 - '(?P<path>.+\.(?:css|js|jpg|png|swf|gif|woff))' 39 + '(?P<path>.+\.(?:'.$extensions.'))' 36 40 => 'CelerityPhabricatorResourceController', 37 41 ), 38 42 );
+2 -2
src/infrastructure/celerity/CelerityResourceController.php
··· 28 28 } 29 29 30 30 $type = CelerityResourceTransformer::getResourceType($path); 31 - $type_map = $this->getSupportedResourceTypes(); 31 + $type_map = self::getSupportedResourceTypes(); 32 32 33 33 if (empty($type_map[$type])) { 34 34 throw new Exception("Only static resources may be served."); ··· 88 88 return $this->makeResponseCacheable($response); 89 89 } 90 90 91 - protected function getSupportedResourceTypes() { 91 + public static function getSupportedResourceTypes() { 92 92 return array( 93 93 'css' => 'text/css; charset=utf-8', 94 94 'js' => 'text/javascript; charset=utf-8',