CORS policy is blocking my php script

Website URL

https://gloomcraft.site

Error Message

Access to fetch at ‘https://gloomcraft.site/GloomToolsUEFN/api.php’ from origin ‘http://gloomcraft.site’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: It does not have HTTP ok status.

Other Information

I have the premium subscription for Infinityfree.

Then please contact support.iFastNet.com, we can’t help you with the premium platform here.

4 Likes

It very clearly says it’s not a CORS policy issue. It says the request “does not have a HTTP ok status”. That’s not a policy issue, that just means your API endpoint is returning an error.

Please have a look in the Network tab in your browser to see that the request is being made and is actually responding successfully. If not, please fix and then test again.

And please make sure to always carefully read error messages. Just because you’re doing a CORS request does not mean that the issue can be solved by updating the CORS policy.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.