Path: blob/master/src/applications/celerity/application/PhabricatorCelerityApplication.php
12256 views
<?php12final class PhabricatorCelerityApplication extends PhabricatorApplication {34public function getName() {5return pht('Celerity');6}78public function canUninstall() {9return false;10}1112public function isUnlisted() {13return true;14}1516public function getRoutes() {17// We serve resources from both the platform site and the resource site.18// This is safe because the user doesn't have any direct control over19// resources.2021// The advantage of serving resources from the resource site (if possible)22// is that we can use a CDN there if one is configured, but there is no23// particular security concern.24return $this->getResourceRoutes();25}2627public function getResourceRoutes() {28$extensions = CelerityResourceController::getSupportedResourceTypes();29$extensions = array_keys($extensions);30$extensions = implode('|', $extensions);3132return array(33'/res/' => array(34'(?:(?P<mtime>[0-9]+)T/)?'.35'(?:(?P<postprocessor>[^/]+)X/)?'.36'(?P<library>[^/]+)/'.37'(?P<hash>[a-f0-9]{8})/'.38'(?P<path>.+\.(?:'.$extensions.'))'39=> 'CelerityPhabricatorResourceController',40),41);42}4344}454647