Magento has been blocked by CORS policy - Solution of the problem.

Job ID: 31985506

Budget: $10 – $30 USD

Have you ever had this problem? (request made by JS for a magento 2.4.2 API)

has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains the invalid value 'onsail.com.br'. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Related categories: Magento