Access to fetch at ‘https://wp.softhardsystem.com/graphql’ from origin ‘http://localhost:8000’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: Redirect is not allowed for a preflight request.
Other Information
I am trying to fetch data and send data to the WP REST & WPGraphQL API. The browser can successfully fetch the data all the time except when the request is applicable for a preflight request. Because when the browser sends the preflight request to the server, the server redirects the request to the default 403 forbidden page (https://infinityfree.net/errors/403/). Why the server is redirecting the request to the 403 forbidden page and how can I remove the redirect?
Hmm… I think you are right. But what is described on the topic is partially true. Because I am able to achieve many things described in the topic. And another question, the browser executing fetch requests definitely supports JS and accepts cookies. So, why some requests are blocked (for example, preflight (OPTIONS method)) and some aren’t?
Your browser does support Javascript, but doesn’t execute it on XHR requests. So your code will just get back the HTML response with the Javascript code, not the result of what happens after the Javascript is executed.
Also, third party cookie blocking may be an issue.