"""Who this service is to the outside: its version, its public address and the User-Agent it sends. Standard library only: the Jolpica client, the poster sources and the API share it. """ import os # The API's own version (cdn-api.py's FastAPI app says the same). APP_VERSION = "1.0.0" # The address this service is reached at, which the Kometa metadata links every poster to and every outgoing # request names. The mesh writes it from the name the route is served under (F1_CIRCUITS_BASE_URL); the fallback # is the address HAL served it at, so a deployment that sets nothing behaves as before. PUBLIC_BASE_URL = os.environ.get("F1_CIRCUITS_BASE_URL", "https://f1-circuits.zurag.be").rstrip("/") # Every outgoing request carries it (Jolpica, the map and photo sources): the app's name and its public address, # never a person's address. USER_AGENT = f"f1-circuits/{APP_VERSION} (+{PUBLIC_BASE_URL})"