Fastapi is based on python type hints so when you pass a query parameter it accepts key: Setting up the uvicorn logger straight from the documentation: Value pair you need to declare it somehow.
FastAPI Request 请求主体详解与使用示例 Fastapi 教程
In my case adding nginx headers and fastapi config for the proxy headers did not work. The fastapi/uvicorn server is not working when specifying the host.