What is Cross-Origin Resource Sharing (CORS) and how does it relate to HTTP?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is Cross-Origin Resource Sharing (CORS) and how does it relate to HTTP?
Asked by:
76 Viewed 76 Answers

Answer (76)

Best Answer
(352)
CORS is a security mechanism that restricts web pages from making requests to a different domain than the one which served the web page. It's implemented through HTTP headers. The server must include specific CORS headers in its responses to allow cross-origin requests. This prevents malicious scripts from accessing sensitive data from other domains.