Update SlowAPI and remove hacky HTTP response

This commit is contained in:
0880
2026-01-17 18:32:37 +03:30
parent 21e298ea9f
commit adcda176cc
2 changed files with 4 additions and 4 deletions

6
app.py
View File

@@ -510,9 +510,9 @@ def sanitize_filename(filename: str, base: Path = Path.cwd().resolve()) -> Path:
async def static(request, fn):
try:
path = sanitize_filename(fn, Path("static/").resolve())
return (
HTTPResponse(request, "", content_type="application/octet-stream")
+ path.read_bytes()
return HTTPResponse(
request, path.read_bytes(), content_type="application/octet-stream"
)
except Exception:
return HTTPResponse(request, "404 File Not Found", status=404)

2
libs

Submodule libs updated: 014cdd80e2...4e04784f9b