From d3482450901b76870b0d06baded48996296f1a51 Mon Sep 17 00:00:00 2001 From: Correl Date: Thu, 15 Jul 2021 21:22:13 -0400 Subject: [PATCH] Serve static content from the root path --- tutor/server.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tutor/server.py b/tutor/server.py index d5154b6..6400cec 100644 --- a/tutor/server.py +++ b/tutor/server.py @@ -102,10 +102,11 @@ def make_app(settings) -> tornado.web.Application: if static_path := settings.get("static"): paths.extend( [ - (r"/", tornado.web.RedirectHandler, {"url": "/app/index.html"}), - (r"/app", tornado.web.RedirectHandler, {"url": "/app/index.html"}), - (r"/app/", tornado.web.RedirectHandler, {"url": "/app/index.html"}), - (r"/app/(.*)", tornado.web.StaticFileHandler, {"path": static_path}), + ( + r"/(.*)", + tornado.web.StaticFileHandler, + {"path": static_path, "default_filename": "index.html"}, + ), ] ) return tornado.web.Application(paths, **settings)