MovedPermanently / -> /index.html

This commit is contained in:
norohind committed 2021-11-25 17:15:29 +03:00
1 parent 636443e097
commit b9d65cac7f
1 file changed
+4 -2
+4 -2
View File
@@ -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')