Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92795351
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, Nov 23, 19:00
Size
630 B
Mime Type
text/x-php
Expires
Mon, Nov 25, 19:00 (2 d)
Engine
blob
Format
Raw Data
Handle
22507116
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