Start here. This is the direct spoken answer to practice first.
Overview
Trusts proxy-derived scheme, host, and client data only from known hops and configures externally visible paths correctly.
A reverse proxy may terminate TLS and forward the request to Uvicorn over HTTP, so the application needs trusted forwarded headers to reconstruct the external scheme, host, and client address. I configure which proxy addresses are trusted rather than accepting those headers from every caller. If the proxy removes a path prefix, FastAPI's root_path tells routing and OpenAPI generation about the externally visible base path.