/-/ alternative URL for homepage, closes #2393

This commit is contained in:
Simon Willison 2024-08-14 17:57:13 -07:00
commit 93067668fe
5 changed files with 33 additions and 1 deletions

View file

@ -1476,6 +1476,8 @@ class Datasette:
routes.append((regex, view))
add_route(IndexView.as_view(self), r"/(\.(?P<format>jsono?))?$")
add_route(IndexView.as_view(self), r"/-/(\.(?P<format>jsono?))?$")
add_route(permanent_redirect("/-/"), r"/-$")
# TODO: /favicon.ico and /-/static/ deserve far-future cache expires
add_route(favicon, "/favicon.ico")