title: Setting headers in the model hook via ajaxSetup (Ember)
body: <p>I'm trying to set the headers before making my call and it's not working.</p>
  
  <pre><code>model: function() {
          debugger;
  
          Ember.$.ajaxSetup({
              beforeSend: function(xhr) {
                  xhr.setRequestHeader(
                      'Authorization', 'bearer 123456'
                  )
          }});
  
          return Ember.$.getJSON('http://addresss/api/locations').then(function(e) {
              debugger;
              console.log(e);
          });
      }
  </code></pre>
  
  <p>This keeps giving me the following error message:</p>
  
  <blockquote>
    <p>No 'Access-Control-Allow-Origin' header is present on the requested
    resource. Origin '<a href="http://localhost:4200" rel="nofollow">http://localhost:4200</a>' is therefore not allowed
    access.</p>
  </blockquote>
  
  <p>If I use Postman and set my header it works fine.</p>