mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-12 08:22:52 -04:00
🐛 Fix frontend fallback support for doted paths like /users/john.doe (#16011)
This commit is contained in:
1 parent
9b8410bdc9
commit
eb75fd078e
3 files changed
+19
-23
No files matched your search
@@ -52,7 +52,7 @@ For that, use `fallback="index.html"`:
|
||||
|
||||
{* ../../docs_src/frontend/tutorial002_py310.py hl[5] *}
|
||||
|
||||
**FastAPI** uses this fallback only for `GET` and `HEAD` requests that look like browser navigation. Missing files like JavaScript, CSS, and images still return `404`.
|
||||
**FastAPI** uses this fallback only for `GET` and `HEAD` requests that explicitly accept HTML with `Accept: text/html` or `Accept: application/xhtml+xml`, as browser navigation requests normally do. Missing files like JavaScript, CSS, and images still return `404`.
|
||||
|
||||
Requests with other methods, like `POST` or `PUT`, to paths that only match the frontend fallback also return `404`. Regular **FastAPI** *path operations* still have higher priority than frontend routes.
|
||||
|
||||
|
||||
Reference in new issue
Block a user