我最近将 fast api 从 v0.89.1 更新到 v0.110.0,并且收到以下错误。
“GET /docs HTTP/1.1”404 未找到
没有其他错误可以帮助我调试问题。
INFO: Uvicorn running on http://0.0.0.0:portNumber (Press CTRL+C to quit)
INFO: Started reloader process [xxxxx] using StatReload
INFO: Started server process [xxxxx]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: - "GET / HTTP/1.1" 404 Not Found
INFO: - "GET /docs HTTP/1.1" 404 Not Found
升级前一切正常。
删除
root_path="/"
解决了问题