Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92914198
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
Sun, Nov 24, 18:54
Size
636 B
Mime Type
text/x-php
Expires
Tue, Nov 26, 18:54 (2 d)
Engine
blob
Format
Raw Data
Handle
22537587
Attached To
rPHINFRA c4science
PhabricatorCustomRobotsController.php
View Options
<?php
final
class
PhabricatorCustomRobotsController
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