{"uid":"cap_8jmggdraKKeV5ZNmzU0UZ","slug":"saylor-innovations-guide-library-cors-preflight-options-debug-15430361","name":"Saylor Innovations Guide Library: CORS Preflight & OPTIONS Debug","description":"Debug CORS errors - reproduce preflight OPTIONS with Origin and Request-Headers in curl or Python, allow-list echo with Vary, credentials rules","url":"https://saylorinnovations.com/api/kb/cors-preflight-options-request-headers-debug-with-curl?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["id","t","c","body"],"properties":{"c":{"type":"string","description":"Category of the guide"},"t":{"type":"string","description":"Title of the guide"},"id":{"type":"string","description":"Identifier of the record"},"body":{"type":"string","description":"Main body text"},"price":{"type":["number","null"],"description":"Price"},"license":{"type":"string","description":"License identifier"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_X6PthCwXKAhhm-TH8hxEn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a structured guide on debugging CORS errors by reproducing preflight OPTIONS requests with curl or Python, handling allow-listing, Vary headers, and credentials rules","exampleAgentPrompt":"Can you pull up the guide on debugging CORS preflight OPTIONS errors — I need to understand how to reproduce the preflight with curl, set up the allow-list with Vary, and handle credentials rules correctly.","exampleUseCases":[{"title":"Debugging a CORS preflight failure","prompt":"My fetch request is getting blocked by a CORS preflight error and I have no idea why — can you get me the guide on how to reproduce the OPTIONS preflight request with curl so I can see exactly what headers are being rejected?"},{"title":"Configuring Vary header for CORS allow-listing","prompt":"I'm building an API that needs to respond correctly to CORS preflight requests and echo back the right headers with Vary — can you fetch the guide that explains how to set that up properly?"},{"title":"Understanding CORS credentials rules","prompt":"I'm trying to get cross-origin requests with credentials (cookies/auth headers) to work but keep hitting CORS errors — can you retrieve the guide that covers the credentials rules for CORS preflight and how to configure them?"}],"resultDescription":"Returns a JSON object containing a guide record with fields: id (record identifier), t (title of the guide), c (category), body (full guide text covering CORS preflight debugging with curl and Python, allow-listing, Vary header usage, and credentials rules), license, and price.","failureModes":["HTTP 402 Payment Required if x402 payment header is missing or invalid","HTTP 404 if the guide record is not found at the specified path","HTTP 500 if the upstream knowledge base is unavailable","Empty or malformed JSON body if the service is misconfigured"],"whenToPreferThis":"Choose this endpoint when an agent or user needs a structured, authoritative written guide on CORS preflight debugging — specifically covering curl/Python reproduction steps, allow-listing with Vary, and credentials rules. Prefer this over generic web search when you want a single, curated, machine-readable guide document rather than scattered search results.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:39:05.407Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-guide-library-cors-preflight-options-debug-15430361"}