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)