Ember-Data and CORS

@mixonic You saved me so much time. (I wish I had found this 4 hours ago :)).

One modification I had to make was to handle the case where hash is undefined.

 ajax: function(url, method, hash) {
    hash = hash || {}; // hash may be undefined
    hash.crossDomain = true;
    hash.xhrFields = {withCredentials: true};
    return this._super(url, method, hash);
  }

Thanks again!

5 Likes