import os RENDERER_URL = os.environ.get("RENDERER_URL", "http://localhost:8002") EXTRACTOR_URL = os.environ.get("EXTRACTOR_URL", "http://localhost:8003") SEARCHER_URL = os.environ.get("SEARCHER_URL", "http://localhost:8001") STAGE_TIMEOUT_S = float(os.environ.get("STAGE_TIMEOUT_S", "60")) REDIS_URL = os.environ.get("REDIS_URL", "") EXTRACT_CACHE_TTL = int(os.environ.get("EXTRACT_CACHE_TTL", "3600")) # Optional bearer-token auth. Empty = auth disabled (trusted networks only). API_KEY = os.environ.get("LWSS_API_KEY", "") # Hostnames allowed to reach the MCP transport (DNS-rebinding protection). # Comma-separated. Behind a reverse proxy set this to your public domain, e.g. # "websearch.example.com". A single "*" disables the protection entirely # (fine when a bearer token + trusted proxy already gate access). MCP_ALLOWED_HOSTS = [ h.strip() for h in os.environ.get("MCP_ALLOWED_HOSTS", "").split(",") if h.strip() ]