Add option to control whether boards and pages are indexed by search engines, using the X-Robots-Tag header

This commit is contained in:
Kijin Sung 2023-08-13 02:03:02 +09:00
parent fde3609f70
commit 2197b0a982
7 changed files with 37 additions and 9 deletions

View file

@ -125,6 +125,12 @@ class DisplayHandler extends Handler
header('X-Content-Type-Options: ' . $header_value);
}
// Print robot headers.
if (isset($oModule->module_info->robots_tag) && $oModule->module_info->robots_tag === 'noindex')
{
header('X-Robots-Tag: noindex');
}
// flush output buffer
while (ob_get_level())
{