fastapi_tools.utils.url
¶
URL utility functions for reverse-proxy-aware request handling.
Functions:
-
get_public_base_url–Determine the public base URL of the application.
get_public_base_url
¶
Determine the public base URL of the application.
Resolution order: 1. override - explicit value (e.g. PUBLIC_BASE_URL env var). 2. X-Forwarded-Proto + X-Forwarded-Host headers (set by the proxy). 3. Scheme and netloc from the raw request URL (local / direct access).