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:
Brian S. Stephan 2021-04-17 15:06:39 -05:00
parent da447d2873
commit f4beb15a3b
1 changed files with 1 additions and 1 deletions

View File

@ -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)