Node.js · Junior · Question 66 of 75
What is CORS, and where is it enforced?
- ✓Correct answer: A browser security rule: the server sends
Access-Control-Allow-*headers to allow pages from other origins to read its responses - 2A Node.js setting that blocks all incoming requests
- 3An npm package that encrypts traffic
Explanation
CORS is enforced by browsers. Requests from curl or another server are not affected. In Express it's usually set up with the cors middleware.