From b9d65cac7f7030d2997838904bc576935bb0ec20 Mon Sep 17 00:00:00 2001 From: norohind <60548839+norohind@users.noreply.github.com> Date: Thu, 25 Nov 2021 17:15:29 +0300 Subject: [PATCH] MovedPermanently / -> /index.html --- web.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web.py b/web.py index db46ab1..c679d86 100644 --- a/web.py +++ b/web.py @@ -66,8 +66,8 @@ class ActivityDiffHtml: class MainPage: - def on_get(self, req: falcon.request.Request, resp: falcon.response.Response, var: str) -> None: - raise falcon.HTTPFound(f'/leaderboard/{var}') + def on_get(self, req: falcon.request.Request, resp: falcon.response.Response) -> None: + raise falcon.HTTPMovedPermanently('/index.html') class Cache: @@ -89,6 +89,8 @@ app.add_route('/diff/{action_id}', ActivityDiffHtml()) app.add_route('/api/cache/{action}', Cache()) +app.add_route('/', MainPage()) + application = app # for uwsgi index_file = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static'), 'index.html')