Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13176100
D16737.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D16737.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -16,6 +16,7 @@
'differential.pkg.js' => '634399e9',
'diffusion.pkg.css' => '91c5d3a6',
'diffusion.pkg.js' => '84c8f8fd',
+ 'favicon.ico' => '30672e08',
'maniphest.pkg.css' => '4845691a',
'maniphest.pkg.js' => '949a7498',
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
@@ -285,6 +286,7 @@
'rsrc/favicons/dark/favicon-196x196.png' => '5e06ee72',
'rsrc/favicons/dark/favicon-32x32.png' => 'bdd7e16b',
'rsrc/favicons/dark/favicon-96x96.png' => '0cf55978',
+ 'rsrc/favicons/dark/favicon.ico' => '4343aaa6',
'rsrc/favicons/dark/mstile-144x144.png' => '4dc9d42d',
'rsrc/favicons/dark/mstile-150x150.png' => '2dc61c90',
'rsrc/favicons/dark/mstile-310x150.png' => '4fe58ab2',
@@ -295,6 +297,7 @@
'rsrc/favicons/favicon-196x196.png' => '95db275e',
'rsrc/favicons/favicon-32x32.png' => '5bd18b6c',
'rsrc/favicons/favicon-96x96.png' => '7242c8e9',
+ 'rsrc/favicons/favicon.ico' => 'cdb11121',
'rsrc/favicons/mask-icon.svg' => 'e132a80f',
'rsrc/favicons/mstile-144x144.png' => '310c2ee5',
'rsrc/favicons/mstile-150x150.png' => '74bf5133',
@@ -314,6 +317,7 @@
'rsrc/favicons/red/favicon-196x196.png' => '94c089a5',
'rsrc/favicons/red/favicon-32x32.png' => '5848673e',
'rsrc/favicons/red/favicon-96x96.png' => '895d54e8',
+ 'rsrc/favicons/red/favicon.ico' => '25172b6b',
'rsrc/favicons/red/mstile-144x144.png' => '448639f5',
'rsrc/favicons/red/mstile-150x150.png' => 'c2ba45d0',
'rsrc/favicons/red/mstile-310x150.png' => 'b0e50799',
@@ -332,6 +336,7 @@
'rsrc/favicons/yellow/favicon-196x196.png' => '932c7c65',
'rsrc/favicons/yellow/favicon-32x32.png' => '005c9f92',
'rsrc/favicons/yellow/favicon-96x96.png' => '3ad9bfa9',
+ 'rsrc/favicons/yellow/favicon.ico' => '2f5b2991',
'rsrc/favicons/yellow/mstile-144x144.png' => 'fc52335c',
'rsrc/favicons/yellow/mstile-150x150.png' => '9e556f80',
'rsrc/favicons/yellow/mstile-310x150.png' => '2c915073',
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -3808,6 +3808,7 @@
'PhabricatorSystemDAO' => 'applications/system/storage/PhabricatorSystemDAO.php',
'PhabricatorSystemDestructionGarbageCollector' => 'applications/system/garbagecollector/PhabricatorSystemDestructionGarbageCollector.php',
'PhabricatorSystemDestructionLog' => 'applications/system/storage/PhabricatorSystemDestructionLog.php',
+ 'PhabricatorSystemFaviconController' => 'applications/system/controller/PhabricatorSystemFaviconController.php',
'PhabricatorSystemReadOnlyController' => 'applications/system/controller/PhabricatorSystemReadOnlyController.php',
'PhabricatorSystemRemoveDestroyWorkflow' => 'applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php',
'PhabricatorSystemRemoveLogWorkflow' => 'applications/system/management/PhabricatorSystemRemoveLogWorkflow.php',
@@ -8942,6 +8943,7 @@
'PhabricatorSystemDAO' => 'PhabricatorLiskDAO',
'PhabricatorSystemDestructionGarbageCollector' => 'PhabricatorGarbageCollector',
'PhabricatorSystemDestructionLog' => 'PhabricatorSystemDAO',
+ 'PhabricatorSystemFaviconController' => 'PhabricatorController',
'PhabricatorSystemReadOnlyController' => 'PhabricatorController',
'PhabricatorSystemRemoveDestroyWorkflow' => 'PhabricatorSystemRemoveWorkflow',
'PhabricatorSystemRemoveLogWorkflow' => 'PhabricatorSystemRemoveWorkflow',
diff --git a/src/applications/celerity/controller/CelerityResourceController.php b/src/applications/celerity/controller/CelerityResourceController.php
--- a/src/applications/celerity/controller/CelerityResourceController.php
+++ b/src/applications/celerity/controller/CelerityResourceController.php
@@ -145,6 +145,7 @@
'eot' => 'font/eot',
'ttf' => 'font/ttf',
'mp3' => 'audio/mpeg',
+ 'ico' => 'image/x-icon',
);
}
diff --git a/src/applications/celerity/resources/CelerityResourcesOnDisk.php b/src/applications/celerity/resources/CelerityResourcesOnDisk.php
--- a/src/applications/celerity/resources/CelerityResourcesOnDisk.php
+++ b/src/applications/celerity/resources/CelerityResourcesOnDisk.php
@@ -39,6 +39,7 @@
'ttf',
'eot',
'mp3',
+ 'ico',
);
}
diff --git a/src/applications/system/application/PhabricatorSystemApplication.php b/src/applications/system/application/PhabricatorSystemApplication.php
--- a/src/applications/system/application/PhabricatorSystemApplication.php
+++ b/src/applications/system/application/PhabricatorSystemApplication.php
@@ -26,6 +26,7 @@
'/readonly/' => array(
'(?P<reason>[^/]+)/' => 'PhabricatorSystemReadOnlyController',
),
+ '/favicon.ico' => 'PhabricatorSystemFaviconController',
);
}
diff --git a/src/applications/system/controller/PhabricatorSystemFaviconController.php b/src/applications/system/controller/PhabricatorSystemFaviconController.php
new file mode 100644
--- /dev/null
+++ b/src/applications/system/controller/PhabricatorSystemFaviconController.php
@@ -0,0 +1,19 @@
+<?php
+
+final class PhabricatorSystemFaviconController extends PhabricatorController {
+
+ public function shouldRequireLogin() {
+ return false;
+ }
+
+ public function processRequest() {
+ $webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/';
+ $content = Filesystem::readFile($webroot.'/rsrc/favicons/favicon.ico');
+
+ return id(new AphrontFileResponse())
+ ->setContent($content)
+ ->setMimeType('image/x-icon')
+ ->setCacheDurationInSeconds(phutil_units('24 hours in seconds'))
+ ->setCanCDN(true);
+ }
+}
diff --git a/src/docs/user/configuration/configuration_guide.diviner b/src/docs/user/configuration/configuration_guide.diviner
--- a/src/docs/user/configuration/configuration_guide.diviner
+++ b/src/docs/user/configuration/configuration_guide.diviner
@@ -48,8 +48,6 @@
DocumentRoot /path/to/phabricator/webroot
RewriteEngine on
- RewriteRule ^/rsrc/(.*) - [L,QSA]
- RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
</VirtualHost>
@@ -91,10 +89,6 @@
rewrite ^/(.*)$ /index.php?__path__=/$1 last;
}
- location = /favicon.ico {
- try_files $uri =204;
- }
-
location /index.php {
fastcgi_pass localhost:9000;
fastcgi_index index.php;
@@ -130,8 +124,6 @@
$HTTP["host"] =~ "phabricator(\.example\.com)?" {
server.document-root = "/path/to/phabricator/webroot"
url.rewrite-once = (
- "^(/rsrc/.*)$" => "$1",
- "^(/favicon.ico)$" => "$1",
# This simulates QSA ("query string append") mode in apache
"^(/[^?]*)\?(.*)" => "/index.php?__path__=$1&$2",
"^(/.*)$" => "/index.php?__path__=$1",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
May 9 2024, 10:26 AM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6274638
Default Alt Text
D16737.diff (6 KB)
Attached To
Mode
D16737: Support ".ico" in Celerity and simplify rewite rule configuration
Attached
Detach File
Event Timeline
Log In to Comment