Browse Source
- Override APIRouter.mount() to only allow StaticFiles; raise FastAPIError for any other ASGI app with a clear message directing users to mount sub-applications on the root FastAPI instance instead - Add APIRouter._mount() as internal bypass used by include_router() and FastAPI.mount() - Override FastAPI.mount() to call self.router._mount() directly, bypassing the StaticFiles-only restriction on APIRouter - Propagate StaticFiles mounts in include_router() via _mount() Fixes #10180pull/14924/head
3 changed files with 34 additions and 24 deletions
Loading…
Reference in new issue