Response to preflight request doesn't pass access control check

I’m getting this error using ngResource to call a REST API on Amazon Web Services:

XMLHttpRequest cannot load Response to
preflight request doesn’t pass access control check: No
‘Access-Control-Allow-Origin’ header is present on the requested
resource. Origin ‘http://localhost’ is therefore not allowed access.
Error 405


socialMarkt.factory('loginService', ['$resource', function ($resource) {
    var apiAddress = "";
    return $resource(apiAddress, {
        login: "facebook",
        access_token: "@access_token",
        facebook_id: "@facebook_id"
    }, {
        getUser: {
            method: 'POST'


    function (data) {
    function (result) {
        console.error('Error', result.status);

I’m using Chrome, and I dont know what else to do in order to fix this problem. I’ve even configured the server to accept headers from origin localhost.

188 thoughts on “Response to preflight request doesn't pass access control check”

  1. Pingback: viagra buy
  2. Pingback: cialis website
  3. Pingback: cialis for sale
  4. Pingback: viagra connect
  5. Pingback: viagra cialis
  6. Pingback: viagra coupon
  7. Pingback: viagra cheap
  8. Pingback: buy cialis online
  9. Pingback: cialis vs viagra
  10. Pingback: female viagra pill
  11. Pingback: sildenafil 50 mg
  12. Pingback: viagra substitute
  13. Pingback: lady viagra
  14. Pingback: viagra tablets uk
  15. Pingback: price for viagra
  16. Pingback: viagra dosage
  17. Pingback: viagra pfizer
  18. Pingback: viagra generic
  19. Pingback: generic viagra
  20. Pingback: buy viagra online
  21. Pingback: viagra price
  22. Pingback: viagra alternative
  23. Pingback: viagra pill

Leave a Comment