Page MenuHomePhabricator

D10048.id.diff
No OneTemporary

D10048.id.diff

diff --git a/src/aphront/configuration/AphrontApplicationConfiguration.php b/src/aphront/configuration/AphrontApplicationConfiguration.php
--- a/src/aphront/configuration/AphrontApplicationConfiguration.php
+++ b/src/aphront/configuration/AphrontApplicationConfiguration.php
@@ -113,11 +113,17 @@
array(
$base_uri,
$prod_uri,
- $file_uri,
),
$conduit_uris,
$allowed_uris);
+ $cdn_routes = array(
+ '/res/',
+ '/file/data/',
+ '/file/xform/',
+ '/phame/r/',
+ );
+
$host_match = false;
foreach ($uris as $uri) {
if ($host === id(new PhutilURI($uri))->getDomain()) {
@@ -126,6 +132,17 @@
}
}
+ if (!$host_match) {
+ if ($host === id(new PhutilURI($file_uri))->getDomain()) {
+ foreach ($cdn_routes as $route) {
+ if (strncmp($path, $route, strlen($route)) == 0) {
+ $host_match = true;
+ break;
+ }
+ }
+ }
+ }
+
// NOTE: If the base URI isn't defined yet, don't activate alternate
// domains.
if ($base_uri && !$host_match) {

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 25, 9:14 AM (2 d, 21 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7721864
Default Alt Text
D10048.id.diff (1 KB)

Event Timeline