Add nofollow to RSS links to avoid bots crawling the feeds.

This commit is contained in:
Sean Harvey 2013-10-24 10:15:22 +13:00
parent d1dcd2bf3c
commit 3a13a46a2d

View File

@ -95,7 +95,12 @@ class VersionFeed_Controller extends Extension {
function linkToAllSiteRSSFeed() {
// RSS feed to all-site changes.
RSSFeed::linkToFeed($this->owner->getSiteRSSLink(), $this->linkToAllSitesRSSFeedTitle());
$title = Convert::raw2xml($this->linkToAllSitesRSSFeedTitle());
$url = $this->owner->getSiteRSSLink();
Requirements::insertHeadTags(
'<link rel="alternate nofollow" type="application/rss+xml" title="' . $title .
'" href="' . $url . '" />');
}
function linkToAllSitesRSSFeedTitle() {