Differential D14008 Diff 33887 src/applications/celerity/application/PhabricatorCelerityApplication.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/celerity/application/PhabricatorCelerityApplication.php
| Show All 9 Lines | public function canUninstall() { | ||||
| return false; | return false; | ||||
| } | } | ||||
| public function isUnlisted() { | public function isUnlisted() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| public function getRoutes() { | public function getRoutes() { | ||||
| // We serve resources from both the platform site and the resource site. | |||||
| // This is safe because the user doesn't have any direct control over | |||||
| // resources. | |||||
| // The advantage of serving resources from the resource site (if possible) | |||||
| // is that we can use a CDN there if one is configured, but there is no | |||||
| // particular security concern. | |||||
| return $this->getResourceRoutes(); | |||||
| } | |||||
| public function getResourceRoutes() { | |||||
| $extensions = CelerityResourceController::getSupportedResourceTypes(); | $extensions = CelerityResourceController::getSupportedResourceTypes(); | ||||
| $extensions = array_keys($extensions); | $extensions = array_keys($extensions); | ||||
| $extensions = implode('|', $extensions); | $extensions = implode('|', $extensions); | ||||
| return array( | return array( | ||||
| '/res/' => array( | '/res/' => array( | ||||
| '(?:(?P<mtime>[0-9]+)T/)?'. | '(?:(?P<mtime>[0-9]+)T/)?'. | ||||
| '(?:(?P<postprocessor>[^/]+)X/)?'. | '(?:(?P<postprocessor>[^/]+)X/)?'. | ||||
| Show All 9 Lines | |||||