Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96574830
PhabricatorCustomRobotsController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Dec 28, 09:23
Size
630 B
Mime Type
text/x-php
Expires
Mon, Dec 30, 09:23 (2 d)
Engine
blob
Format
Raw Data
Handle
23174261
Attached To
rPH Phabricator
PhabricatorCustomRobotsController.php
View Options
<?php
final
class
PhabricatorRobotsController
extends
PhabricatorController
{
public
function
shouldRequireLogin
()
{
return
false
;
}
public
function
processRequest
()
{
$out
=
array
();
$out
[]
=
'User-Agent: *'
;
$out
[]
=
'Disallow: /herald/'
;
$out
[]
=
'Disallow: /passphrase/'
;
$out
[]
=
'Disallow: /conduit/'
;
$out
[]
=
'Disallow: /dashboard/'
;
$out
[]
=
'Crawl-delay: 1'
;
$content
=
implode
(
"
\n
"
,
$out
).
"
\n
"
;
return
id
(
new
AphrontPlainTextResponse
())
->
setContent
(
$content
)
->
setCacheDurationInSeconds
(
phutil_units
(
'2 hours in seconds'
))
->
setCanCDN
(
true
);
}
}
Event Timeline
Log In to Comment