Skip to content

CORS

CORS (Cross-Origin Resource Sharing) is a browser security mechanism that controls which web origins can make requests to your API. By default, browsers block cross-origin requests (e.g., a frontend at app.example.com calling an API at api.example.com). CORS headers configure which origins, HTTP methods, and headers are allowed. In AI applications with separate frontend and backend services, proper CORS configuration is essential for the frontend to communicate with the API server, WebSocket endpoints, and SSE streams. Misconfigured CORS is a common source of deployment issues.

Related Terms

Ready to build your first production AI agent?

Open-source tools, battle-tested patterns, zero boilerplate. Configure your stack and ship in minutes — not months.