From 3dc7876117f375fd94d2e6355dd0dc8b01328b04 Mon Sep 17 00:00:00 2001 From: James Rhodes Date: Fri, 13 Jun 2014 05:47:06 -0700 Subject: [PATCH] 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 --- .../celerity/CelerityStaticResourceResponse.php | 9 +++++++-- src/view/page/PhabricatorStandardPageView.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/infrastructure/celerity/CelerityStaticResourceResponse.php b/src/infrastructure/celerity/CelerityStaticResourceResponse.php index feba9ffac1..746ea9e362 100644 --- a/src/infrastructure/celerity/CelerityStaticResourceResponse.php +++ b/src/infrastructure/celerity/CelerityStaticResourceResponse.php @@ -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); + } } } diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php index 4a80b32454..4c8817fa59 100644 --- a/src/view/page/PhabricatorStandardPageView.php +++ b/src/view/page/PhabricatorStandardPageView.php @@ -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');