This just does not seem to be working. I’ve tried the examples that were given in the documentation to no avail. If I hard-code it without the function, they are inserted. If I try to make it dynamic - the code inside never executes (verified by logging to the console). Even if it isn’t dynamic like the examples, they don’t get added to the headers:
App.ApplicationAdapter = DS.RESTAdapter.extend({
headers: function(){
return {
Authorization: 'CuzISaySo',
Project: 'MyAwesomeProject',
};
}
});
I have validated that my CORS header is set to accept them. Not sure what else to do; seems like a bug due to the delta in behavior between the documentation and my real-world experience.
Ember : 1.7.0
Ember Data : 1.0.0-beta.5
Handlebars : 1.3.0
jQuery : 2.0.3