POST, PATCH and DELETE method CORS problem

Website URL

https://airisoft.infinityfreeapp.com/

Error Message

Access to XMLHttpRequest at ‘https://errors.infinityfree.net/403/’ (redirected from ‘https://airisoft.infinityfreeapp.com/API/database.php?’) from origin ‘https://airisoft.infinityfreeapp.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Other Information

I’m sending a post request using Angular as front end and php as backend, but I get this problem when I try to update or delete some information fron the database. When I use the GET method all works correct. I try in my localhost and all worked find, so I don`t know the problem.

Hello

Only GET and POST requests are supported on free hosting. As to why GET works but POST does not, I don’t really have an answer from the limited information you provided.

It may have to do with this:

4 Likes

Oh sorry, I confuse, I use PATCH and DELETE, so thats the problem, thanks

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