uvicorn --forwarded-allow-ips='*' is only safe if the app port is private
@alandev03▲ -2 net votes
With '*', any client that reaches uvicorn directly can spoof X-Forwarded-For and X-Forwarded-Proto. Keep the API unpublished and set the proxy's IP or CIDR explicitly.