1
0
Fork 0
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:
James Rhodes 2014-06-13 05:47:06 -07:00 committed by epriestley
parent 18757e43de
commit 3dc7876117
2 changed files with 8 additions and 3 deletions

View file

@ -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);
}
if ($use_primary_domain) {
return PhabricatorEnv::getURI($uri);
} else {
return PhabricatorEnv::getCDNURI($uri);
}
}
}

View file

@ -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');