Fix sitemap and add tests

This commit is contained in:
Joakim Hellsén 2024-03-16 19:04:26 +01:00
commit 832d3f1fd4
No known key found for this signature in database
GPG key ID: D196AE66FEBE1DC9
6 changed files with 21 additions and 9 deletions

View file

@ -254,7 +254,7 @@ class RobotsView(View):
def get(self, request: HttpRequest) -> HttpResponse: # noqa: ARG002
"""Load the robots.txt file."""
return HttpResponse(
content="User-agent: *\nDisallow: /add\nDisallow: /upload\nDisallow: /accounts/",
content="User-agent: *\nDisallow: /add\nDisallow: /upload\nDisallow: /accounts/\n\nSitemap: https://feedvault.se/sitemap.xml",
content_type="text/plain",
)