CORS

Domain: Internet & Web

🎯 Motivation

Cross-Origin Resource Sharing - controls which websites can access your API. Security feature.

📋 Concrete Example

CORS: your API at api.example.com. Website at example.com can access it. Website at evil.com cannot. CORS prevents other websites from misusing your API.

🔗 Analogy

CORS is like a guest list at a party - only people on the list (allowed origins) can enter. Others are turned away. CORS ensures only authorized websites can access your API.