FastAPI 0.138.2 is now available, introducing a behavior change for app.frontend() static file serving and internal sponsor data refactoring.
app.frontend()now returns 404 for non-GET/HEAD methods. Previously,app.frontend()would attempt to serve static files for any HTTP method. With this fix (PR #15863 by @tiangolo), if a request uses a method other thanGETorHEADand no static file matches, the response is now a 404 Not Found instead of a potential error or unexpected behavior. This aligns with standard web server conventions.- Removed Stainless from sponsors. The sponsor list has been updated (PR #15862) by removing Stainless.
- Refactored sponsor data handling for banners. Internal code for generating sponsor banners was refactored (PR #15852) for better maintainability.
While this release is minor, the method restriction for app.frontend() is important for developers using FastAPI to serve static content. It ensures that operations like POST or DELETE on static file routes return a proper 404 rather than being silently mishandled. The sponsor-related changes are internal, affecting only the project's website and documentation. Upgrade to ensure consistency in static file handling and to keep your sponsor banner data current.
Source: https://github.com/fastapi/fastapi/releases/tag/0.138.2