]> git.ipfire.org Git - ipfire.org.git/commitdiff
web: Accept trailing slashes on some redirections
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Jan 2024 11:59:38 +0000 (11:59 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Jan 2024 11:59:38 +0000 (11:59 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/__init__.py

index 11b91cc96f71917daff51257c0ce1fae4512f1af..a8ff3683cbed16af37e2b9e11ad19304a22ee945 100644 (file)
@@ -157,7 +157,7 @@ class Application(tornado.web.Application):
                        (r"/docs(/[A-Za-z0-9\-_\/]+)?/_files", docs.FilesHandler),
                        (r"/docs(/[A-Za-z0-9\-_\/]+(?:.*)\.(?:\w+))/_delete", docs.DeleteFileHandler),
                        (r"/docs(/[A-Za-z0-9\-_\/]+(?:.*)\.(?:\w+))$", docs.FileHandler),
-                       (r"/docs(/[A-Za-z0-9\-_\/]+)?", docs.PageHandler),
+                       (r"/docs(/[A-Za-z0-9\-_\/]*)?", docs.PageHandler),
 
                        # Downloads
                        (r"/downloads", downloads.IndexHandler),
@@ -181,7 +181,7 @@ class Application(tornado.web.Application):
                        (r"/.well-known/change-password", auth.WellKnownChangePasswordHandler),
 
                        # Projects
-                       (r"/projects/location", location.IndexHandler),
+                       (r"/projects/location/?", location.IndexHandler),
                        (r"/projects/location/download", StaticHandler, { "template" : "location/download.html" }),
                        (r"/projects/location/how\-to\-use", StaticHandler, { "template" : "location/how-to-use.html" }),
                        (r"/projects/location/lookup/(.+)", location.LookupHandler),