From: Michael Tremer Date: Thu, 25 Jan 2024 11:59:38 +0000 (+0000) Subject: web: Accept trailing slashes on some redirections X-Git-Url: http://git.ipfire.org/?p=ipfire.org.git;a=commitdiff_plain;h=803f1cc2a9cc0d725b1f720bc1cc2d6dea352c26 web: Accept trailing slashes on some redirections Signed-off-by: Michael Tremer --- diff --git a/src/web/__init__.py b/src/web/__init__.py index 11b91cc9..a8ff3683 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -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),