web: Save a 301 redirect from /help to /help/.

This commit is contained in:
Alex Vandiver
2023-03-23 03:51:28 +00:00
committed by Tim Abbott
parent 6f4d22762c
commit 164d58bec9
8 changed files with 10 additions and 10 deletions

View File

@@ -41,7 +41,7 @@ class UnusedImagesLinterSpider(BaseDocumentationSpider):
class HelpDocumentationSpider(UnusedImagesLinterSpider):
name = "help_documentation_crawler"
start_urls = ["http://localhost:9981/help"]
start_urls = ["http://localhost:9981/help/"]
deny_domains: List[str] = []
deny = ["/policies/privacy"]
images_path = "static/images/help"
@@ -58,7 +58,7 @@ class PorticoDocumentationSpider(BaseDocumentationSpider):
def _is_external_url(self, url: str) -> bool:
return (
not url.startswith("http://localhost:9981")
or url.startswith(("http://localhost:9981/help", "http://localhost:9981/api"))
or url.startswith(("http://localhost:9981/help/", "http://localhost:9981/api"))
or self._has_extension(url)
)