From 711c5166caee7d7da27ab64c9dcc53dde5202851 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Fri, 30 Apr 2021 13:29:27 +0300 Subject: [PATCH] fix --- autoindex.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoindex.py b/autoindex.py index 3927459..b5b90f4 100644 --- a/autoindex.py +++ b/autoindex.py @@ -18,8 +18,6 @@ app.static('/~static/', '~static/', use_content_range=True, stream_large_files=T j2env = get_j2env(DEBUG) -@app.route('/') -@app.route('/') async def index(request: Request, path=''): domain = request.host query = f'?{request.query_string}' if request.query_string else '' @@ -53,6 +51,10 @@ async def index(request: Request, path=''): abort(404, 'Path was not found') +app.get('/')(index) +app.get('/')(index) + + if __name__ == '__main__': if DEBUG: app.run(host='localhost', port=8080, debug=True, auto_reload=True)