mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 02:01:40 +09:00
Prevent robots from indexing file download links
https://xetown.com/topics/1708853
This commit is contained in:
parent
df56b7f8b1
commit
772d26ee2f
1 changed files with 3 additions and 0 deletions
|
|
@ -393,6 +393,8 @@ class fileController extends file
|
|||
{
|
||||
$url = getNotEncodedUrl('', 'module', 'file', 'act', 'procFileOutput', 'file_srl', $file_srl, 'file_key', $file_key, 'force_download', Context::get('force_download') === 'Y' ? 'Y' : null);
|
||||
}
|
||||
|
||||
header('X-Robots-Tag: noindex');
|
||||
header('Location: ' . $url);
|
||||
Context::close();
|
||||
exit();
|
||||
|
|
@ -535,6 +537,7 @@ class fileController extends file
|
|||
header('Content-Length: ' . $range_length);
|
||||
header('Accept-Ranges: bytes');
|
||||
header('Etag: "' . $etag . '"');
|
||||
header('X-Robots-Tag: noindex');
|
||||
|
||||
// Print the file contents
|
||||
for($offset = 0; $offset < $range_length; $offset += 4096)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue