Merge pull request #74 from gherkins/patch-1

add X-Robots-Tag header
This commit is contained in:
Will Rossiter 2014-10-21 21:27:53 +13:00
commit 05e62cbbc8

View File

@ -33,6 +33,7 @@ class GoogleSitemapController extends Controller {
Config::inst()->update('SSViewer', 'set_source_file_comments', false);
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
$this->getResponse()->addHeader('X-Robots-Tag', 'noindex');
$sitemaps = GoogleSitemap::get_sitemaps();
$this->extend('updateGoogleSitemaps', $sitemaps);
@ -59,6 +60,7 @@ class GoogleSitemapController extends Controller {
Config::inst()->update('SSViewer', 'set_source_file_comments', false);
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
$this->getResponse()->addHeader('X-Robots-Tag', 'noindex');
$items = GoogleSitemap::get_items($class, $page);
$this->extend('updateGoogleSitemapItems', $items, $class, $page);