You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support every ASGI framework's mount convention via root_path
HashedStatic.__call__ reads scope["root_path"] to determine how the
framework scoped the request. Starlette and FastAPI set root_path
but leave the full path intact; Litestar strips the mount prefix
from the path entirely. Both styles now resolve to the same relative
file path. Standalone raw ASGI usage without a framework falls back
to self.prefix matching.
Key design decisions:
- prefix remains a URL-generation concern (used by url() only).
Request routing in __call__ uses root_path, not prefix.
- Path traversal protections (resolve + is_relative_to) sit
downstream of the dispatch, guarding all three branches equally.
0 commit comments