Setting host on DS.RESTAdapter removing ember-simple-auth headers


#1

I’m using the ember-cli-simple-auth with ember-cli and everything it working great, until I try and set a new host on DS.RESTAdapter application wide.

As soon as I set

// adapters/application.js
exports default DS.RESTAdapter.extend({
    host: 'https://api.example.com'
});

or even using reopen() it clears all the headers set by ember-simple-auth.

Am I not setting this up right in ember-cli?


#2

Ember Simple Auth doesn’t inject the Authorization header for cross origin requests. You’d have to whitelist the origin explicitly: http://ember-simple-auth.simplabs.com/ember-simple-auth-api-docs.html#SimpleAuth-Configuration-crossOriginWhitelist