CORS Policy Purpose
Multiple Choice Medium
Question
What is the primary purpose of CORS?
Hint
CORS stands for Cross-Origin Resource Sharing.
Explanation
CORS (Cross-Origin Resource Sharing) is a browser security mechanism that controls which origins can make requests to a different origin. Without CORS, any website could make requests to any API, exposing users to data theft. The server sends Access-Control-Allow-Origin headers to permit specific origins.
Related Resources
Related Lessons
- Web Security
Learn web security.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.