Courses / Frontend Security & Observability
3. Cross-Origin Resource Sharing (CORS) basics for frontends
Understanding browser CORS constraints and the frontend implications for calling APIs.
JavaScript
Cross-Origin Resource Sharing (CORS) basics for frontends
CORS is a browser security rule that controls which websites can make frontend requests to other domains.
"I can fetch data from any server in Node, so why does my browser say the request was blocked?"
CORS is a browser-enforced policy where servers opt in to let web pages from other origins access their resources by sending specific HTTP headers. Frontend developers must understand which requests are allowed automatically and when the server must permit access.
"I can fetch data from any server in Node, so why does my browser say the request was blocked?"
CORS is a browser-enforced policy where servers opt in to let web pages from other origins access their resources by sending specific HTTP headers. Frontend developers must understand which requests are allowed automatically and when the server must permit access.