CORS mechanism
The CORS (Cross-Origin Resource Sharing) mechanism ensures that the client agent obtains permission to access resources from another server on the origin (domain).
At the moment, many pages of modern websites can load various files, including images from third-party resources (domains). For the security of such a site, browsers limit cross-origin requests caused by scripts. Such requests are regulated by the CORS policy. According to this policy, the site to which you send a request must agree to respond to it. To do this, it must return the appropriate HTTP headers.
Also, to eliminate such blocking, the CORS mechanism is used, which supports cross-domain requests over a special secure connection. In modern browsers, CORS is used in API containers (XMLHttpRequest or Fetch).