Air sites now respond correctly to HTTP HEAD requests. If you use Facebook link previews, Twitter cards, Slack unfurls, or uptime monitors that send HEAD, they work on Air out of the box.
uv tool upgrade air
What's fixed
-
HTTP HEAD requests return 200 instead of 405. Every GET route (
@app.page,@app.get,@router.page,@router.get) now responds to HEAD with the correct status, headers, and empty body. FastAPI's routing layer has never added HEAD to GET routes the way Starlette does. Air now restores that behavior in its own route class. (#1123) -
Cleaner linter config for dependency injection. Air's
ruff.tomlnow lists its immutable function calls (Depends,Query,Header, etc.) inextend-immutable-calls, removing the need fornoqa: B008comments throughout the codebase. (#1109)
Contributors
@audreyfeldroy (Audrey M. Roy Greenfeld) traced the HEAD bug to FastAPI's route initialization and wrote the fix.
@pydanny (Daniel Roy Greenfeld) cleaned up the doc build.
Thanks to @francisdbillones (Francis Billones) for adding extend-immutable-calls to the ruff config and cleaning up the noqa comments.