From b1656d1eea1d5ec340d10b68f41e0960650e8c5c Mon Sep 17 00:00:00 2001 From: sbwalker Date: Wed, 9 Apr 2025 11:26:33 -0400 Subject: [PATCH] improve sitemap detection in robots.txt --- Oqtane.Server/Infrastructure/Middleware/TenantMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Server/Infrastructure/Middleware/TenantMiddleware.cs b/Oqtane.Server/Infrastructure/Middleware/TenantMiddleware.cs index 5afc1326..1c2ec3c9 100644 --- a/Oqtane.Server/Infrastructure/Middleware/TenantMiddleware.cs +++ b/Oqtane.Server/Infrastructure/Middleware/TenantMiddleware.cs @@ -84,7 +84,7 @@ namespace Oqtane.Infrastructure // allow all user agents by default robots = $"User-agent: *"; } - if (!robots.ToLower().Contains("sitemap")) + if (!robots.ToLower().Contains("Sitemap:")) { // add sitemap if not specified robots += $"\n\nSitemap: {context.Request.Scheme}://{alias.Name}/sitemap.xml";