Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F490545
PhabricatorFaviconController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1002 B
Referenced Files
None
Subscribers
None
PhabricatorFaviconController.php
View Options
<?php
final
class
PhabricatorFaviconController
extends
PhabricatorController
{
public
function
shouldRequireLogin
()
{
return
false
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
// See PHI1719. Phabricator uses "<link /"> tags in the document body
// to direct user agents to icons, like this:
//
// <link rel="icon" href="..." />
//
// However, some software requests the hard-coded path "/favicon.ico"
// directly. To tidy the logs, serve some reasonable response rather than
// a 404.
// NOTE: Right now, this only works for the "PhabricatorPlatformSite".
// Other sites (like custom Phame blogs) won't currently route this
// path.
$ref
=
id
(
new
PhabricatorFaviconRef
())
->
setWidth
(
64
)
->
setHeight
(
64
);
id
(
new
PhabricatorFaviconRefQuery
())
->
withRefs
(
array
(
$ref
))
->
execute
();
return
id
(
new
AphrontRedirectResponse
())
->
setIsExternal
(
true
)
->
setURI
(
$ref
->
getURI
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, May 7, 8:49 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
80749
Default Alt Text
PhabricatorFaviconController.php (1002 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment