# Claude Code Proxy Configuration # Server Configuration SERVER_HOST=127.0.0.1 PORT=3001 READ_TIMEOUT=500 WRITE_TIMEOUT=500 IDLE_TIMEOUT=500 # Anthropic API Configuration # URL to forward requests to (the actual Anthropic API) ANTHROPIC_FORWARD_URL=https://api.anthropic.com ANTHROPIC_VERSION=2023-06-01 ANTHROPIC_MAX_RETRIES=3 # OpenAI Configuration (for subagent routing) # OPENAI_API_KEY=your-openai-api-key # OPENAI_BASE_URL=https://api.openai.com # OPENAI_ALLOW_CLIENT_API_KEY=false # OPENAI_CLIENT_API_KEY_HEADER=x-openai-api-key # Auth Configuration # AUTH_ENABLED=false # AUTH_TOKEN=change-me # AUTH_API_KEY_HEADER=x-api-key # AUTH_ALLOW_LOCALHOST_BYPASS=true # Dashboard Auth (protects web UI and data endpoints with HTTP basic auth) # When set, accessing the dashboard or /api/* data routes requires user "admin" # with this password. Proxy endpoints (/v1/messages, /health) are NOT affected. # DASHBOARD_PASSWORD=change-me-to-a-strong-password # Reverse-proxy deployments # Set this to true when the proxy itself binds publicly but is only reachable # through a trusted reverse proxy such as Traefik. # TRUST_PROXY=true # Storage Configuration # DB_TYPE=sqlite # DATABASE_URL=postgresql://user:password@localhost:5432/claude_code_proxy?sslmode=disable # TEST_POSTGRES_DSN=postgresql://user:password@localhost:5432/claude_code_proxy_test?sslmode=disable # TEST_POSTGRES_USER=test # TEST_POSTGRES_PASSWORD=test # TEST_POSTGRES_DB=claude_code_proxy_test # TEST_POSTGRES_PORT=5434 DB_PATH=requests.db STORAGE_CAPTURE_REQUEST_BODY=true STORAGE_CAPTURE_RESPONSE_BODY=true STORAGE_METADATA_ONLY=false STORAGE_RETENTION_DAYS=0 # STORAGE_REDACTED_FIELDS=api_key,authorization,token,password,secret,access_token,refresh_token,client_secret # CORS Configuration (comma-separated values) # Defaults are permissive. Set these explicitly if you want tighter browser access. # CORS_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://localhost:5174,http://127.0.0.1:5174 # CORS_ALLOWED_METHODS=GET,POST,DELETE,OPTIONS # CORS_ALLOWED_HEADERS=Accept,Authorization,Content-Type,Anthropic-Version,Anthropic-Beta,X-API-Key,X-Requested-With