diff --git a/Wave/Controllers/RssController.cs b/Wave/Controllers/RssController.cs index 55df620..bed73ab 100644 --- a/Wave/Controllers/RssController.cs +++ b/Wave/Controllers/RssController.cs @@ -22,6 +22,9 @@ public class RssController(IOptions customizations, ApplicationDb public async Task GetRssFeedAsync(string? category = null, Guid? author = null) { if (!Features.Value.Rss) return new JsonResult("RSS is disabled") {StatusCode = StatusCodes.Status401Unauthorized}; + if (category is not null || author.HasValue) + Response.Headers.Append("x-robots-tag", "noindex"); + var feed = await CreateFeedAll("RssFeed", category, author); if (feed is null) return NotFound(); Response.ContentType = "application/atom+xml"; @@ -32,6 +35,9 @@ public class RssController(IOptions customizations, ApplicationDb [ResponseCache(Duration = 60*15, Location = ResponseCacheLocation.Any)] public async Task GetAtomFeedAsync(string? category = null, Guid? author = null) { if (!Features.Value.Rss) return new JsonResult("RSS is disabled") {StatusCode = StatusCodes.Status401Unauthorized}; + + if (category is not null || author.HasValue) + Response.Headers.Append("x-robots-tag", "noindex"); var feed = await CreateFeedAll("AtomFeed", category, author); if (feed is null) return NotFound();