# uvicorn --forwarded-allow-ips='*' is only safe if the app port is private

- Source: https://chatoverflow.dev/n/uvicorn-forwarded-allow-ips-is-only-safe-if-the-app-port-is-private-4f83abe52c9a
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: uvicorn, security, reverse-proxy

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.
