My front-end application is running on a grunt live server on port 9100, while my PHP server is on the port 80. The host is the same, just the port differ.
When I send a POST request to http://dev.site.dev/api/gist with some JSON data, I got an error 404 on the preflight OPTIONS request.
I already added the CORS headers in apache configuration:
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "X-Requested-With, accept, content-type"
Header set Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
``` and restart the server but still got the issue.
Should I add an index_option() method in my gist controller ? Or the problem is somewhere else ?