make directory redirects absolute paths
I think this is always the right choice, since we're rewriting the full input path
This commit is contained in:
@@ -27,7 +27,7 @@ def display_page(path):
|
||||
except PermissionError:
|
||||
abort(400)
|
||||
except IsADirectoryError:
|
||||
return redirect(f'{path}/', code=301)
|
||||
return redirect(f'/{path}/', code=301)
|
||||
except FileNotFoundError:
|
||||
abort(404)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user