Add a few more views.
@@ -630,7 +630,7 @@ class Project(models.Model):
It is used for doc serving on projects that have their own URLConf.
"""
from readthedocs.projects.views.public import ProjectDownloadMedia
- from readthedocs.proxito.views.serve import ServeDocs
+ from readthedocs.proxito.views.serve import ServeDocs, ServeError404, ServeRobotsTXT, ServeSitemapXML
from readthedocs.proxito.views.utils import proxito_404_page_handler
class ProxitoURLConf:
@@ -652,6 +652,13 @@ class Project(models.Model):
ProjectDownloadMedia.as_view(same_domain_url=True),
name='fake_proxied_downloads'
),
+ re_path(
+ r'^_proxito_404_(?P<proxito_path>.*)$',
+ ServeError404.as_view(),
+ name='proxito_404_handler',
+ ),
+ re_path(r'robots\.txt$', ServeRobotsTXT.as_view(), name='robots_txt'),
+ re_path(r'sitemap\.xml$', ServeSitemapXML.as_view(), name='sitemap_xml'),
re_path(
'^{real_urlconf}'.format(real_urlconf=self.real_urlconf),
ServeDocs.as_view(),
