mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 05:20:56 +01:00
Ensure Aphlict is served on the primary domain
Summary: This ensure that Aphlict is always served on the primary / production domain, because the alternate file domain is intended to prevent Flash execution. Test Plan: Confirmed this fixes the issue by visiting https://code.redpointsoftware.com.au/ and seeing notification messages. Reviewers: joshuaspence, #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9511
This commit is contained in:
parent
18757e43de
commit
3dc7876117
2 changed files with 8 additions and 3 deletions
|
@ -283,7 +283,8 @@ final class CelerityStaticResourceResponse {
|
|||
|
||||
public function getURI(
|
||||
CelerityResourceMap $map,
|
||||
$name) {
|
||||
$name,
|
||||
$use_primary_domain = false) {
|
||||
|
||||
$uri = $map->getURIForName($name);
|
||||
|
||||
|
@ -298,7 +299,11 @@ final class CelerityStaticResourceResponse {
|
|||
$uri = preg_replace('@^/res/@', '/res/'.$mtime.'T/', $uri);
|
||||
}
|
||||
|
||||
return PhabricatorEnv::getCDNURI($uri);
|
||||
if ($use_primary_domain) {
|
||||
return PhabricatorEnv::getURI($uri);
|
||||
} else {
|
||||
return PhabricatorEnv::getCDNURI($uri);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -373,7 +373,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
|
|||
}
|
||||
|
||||
$map = CelerityResourceMap::getNamedInstance('phabricator');
|
||||
$swf_uri = $response->getURI($map, 'rsrc/swf/aphlict.swf');
|
||||
$swf_uri = $response->getURI($map, 'rsrc/swf/aphlict.swf', true);
|
||||
|
||||
$enable_debug = PhabricatorEnv::getEnvConfig('notification.debug');
|
||||
|
||||
|
|
Loading…
Reference in a new issue