File size: 790 Bytes
2af6ef5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bd113f3
 
2af6ef5
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""PhantomAPI — Configuration via environment variables."""

from pydantic_settings import BaseSettings


class Settings(BaseSettings):
    """Application settings loaded from .env file or environment variables."""

    # --- Security ---
    API_SECRET_KEY: str = "change-me-to-a-strong-secret"

    # --- Server ---
    HOST: str = "0.0.0.0"
    PORT: int = 7860

    # --- Browser Engine ---
    HEADLESS: bool = True
    BROWSER_TIMEOUT: int = 120000  # milliseconds
    CHATGPT_SESSION_TOKEN: str = ""  # __Secure-next-auth.session-token
    PROXY_URL: str = ""              # e.g. http://user:pass@host:port

    model_config = {
        "env_file": ".env",
        "env_file_encoding": "utf-8",
        "extra": "ignore",
    }


settings = Settings()