Cross-origin resource sharing (CORS) is an important HTTP mechanism. It is responsible for allowing or denying asynchronous requests from other domains.
CORS , in practice, includes only the HTTP headers that are included on the server side. Those headers can indicate which domain can consume the API, which HTTP methods are allowed, and, mainly, which endpoints can be shared publicly for applications from other domains to consume. Generally when implementing CORS in a browser, each cross-origin request will be preceded by an OPTIONS request ...