{
  "id": "python/starlette-multiple-cors-origins",
  "signature": "starlette.middleware.cors.CORSMiddleware: Invalid CORS origin: 'https://example.com'",
  "signature_zh": "Starlette CORS中间件错误：无效的CORS来源",
  "regex": "starlette\\.middleware\\.cors\\.CORSMiddleware:\\ Invalid\\ CORS\\ origin:\\ 'https://example\\.com'",
  "domain": "python",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "The CORS middleware is configured with a list of allowed origins, but the incoming request's Origin header is not in the list, causing rejection.",
  "root_cause_type": "generic",
  "root_cause_zh": "CORS中间件配置了允许的来源列表，但请求的Origin头不在列表中，导致被拒绝。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Adding the origin to the list after the request doesn't help because the middleware checks at request time.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using wildcard `*` with credentials is not allowed in browsers, so it fails for credentialed requests.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Add the exact origin to `allow_origins` list, or use a regex pattern with `allow_origin_regex`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "If credentials are needed, cannot use wildcard; use specific origins.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}