From 4aedb82171a1e206ae11dbb99427176ddf5cea01 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Tue, 24 Nov 2020 10:01:10 +0100 Subject: [PATCH] Fix: accoring to robots.txt spec, sitemap has to be a FQDN --- truewiki/web_routes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/truewiki/web_routes.py b/truewiki/web_routes.py index 00a3bee..8842f90 100644 --- a/truewiki/web_routes.py +++ b/truewiki/web_routes.py @@ -132,7 +132,10 @@ async def sitemap_page(request): @csp_header async def robots(request): if sitemap.FRONTEND_URL: - return web.Response(body="User-agent: *\nSitemap: /sitemap.xml", content_type="text/plain") + return web.Response( + body=f"User-agent: *\nSitemap: {sitemap.FRONTEND_URL}/sitemap.xml", + content_type="text/plain", + ) else: return web.Response(body="User-agent: *", content_type="text/plain")