Web Development

What is CORS?

Cross-Origin Resource Sharing — a security mechanism controlling which domains can access resources.

Definition

CORS (Cross-Origin Resource Sharing) is a browser security feature that restricts web pages from making requests to a different domain than the one serving the page. When a frontend at app.example.com tries to fetch data from api.other.com, the browser sends a preflight OPTIONS request. The server must respond with appropriate Access-Control-Allow-* headers to permit the cross-origin request.

Related Terms

Keep the references coming

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.