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:
parent
da447d2873
commit
f4beb15a3b
|
@ -27,7 +27,7 @@ def display_page(path):
|
||||||
except PermissionError:
|
except PermissionError:
|
||||||
abort(400)
|
abort(400)
|
||||||
except IsADirectoryError:
|
except IsADirectoryError:
|
||||||
return redirect(f'{path}/', code=301)
|
return redirect(f'/{path}/', code=301)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue