Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96371743
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
Thu, Dec 26, 01:49
Size
630 B
Mime Type
text/x-php
Expires
Sat, Dec 28, 01:49 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23174261
Attached To
rPHINFRA c4science
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