mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix for Amazon Linux static assets 404ing, refs #1124
This commit is contained in:
parent
e048791a9a
commit
6b4c55efea
1 changed files with 1 additions and 1 deletions
|
|
@ -294,7 +294,7 @@ def asgi_static(root_path, chunk_size=4096, headers=None, content_type=None):
|
||||||
return
|
return
|
||||||
# Ensure full_path is within root_path to avoid weird "../" tricks
|
# Ensure full_path is within root_path to avoid weird "../" tricks
|
||||||
try:
|
try:
|
||||||
full_path.relative_to(root_path)
|
full_path.relative_to(root_path.resolve())
|
||||||
except ValueError:
|
except ValueError:
|
||||||
await asgi_send_html(send, "404", 404)
|
await asgi_send_html(send, "404", 404)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue