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.