What is CORS?
CORS (Cross-Origin Resource Sharing) is needed as a web standard that allows for requests coming from one domain, to access resources from another. This standard was necessary due to the restrictive nature of the same-origin policy, which restricts such interactions to not only the same domain, but also the same protocol and port.
The CORS standard allows browsers to make a cross domain request if the server responds appropriately with special headers defining which origins can access them.
For example, the header: Access-Control-Allow-Origin: *
would allow all origins.