You can read more about that from here: http://www.html5rocks.com/en/tutorials/cors/.
Your resource methods won't get hit, so their headers will never get set. The reason is that there is what's called a preflight request before the actual request, which is an OPTIONS request. So the error comes from the fact that the preflight request doesn't produce the necessary headers. check that you will need to add following in your .htaccess file:
Header set Access-Control-Allow-Origin "*"