title: im getting CORS header ‘Access-Control-Allow-Origin’ missing in angularjs
body: <p>I'm getting a <code>CORS</code> header missing error. I can't modify the code of the back end web service, I can only change the client side application.</p>
  
  <p>I can add the "<code>Allow control allow origin</code>" addon on google chrome but I don't want to install the add on all the clients to access the api. How can i change my <code>AngularJS</code> code so that I will not get this issue?</p>
  
  <pre><code>&lt;script&gt;
  var app = angular.module('myApp', []);
  app.controller('myCtrl', function ($scope, $http) {
      $http.get('url', {
          headers: { 'Authorization': 'Basic a2VybmVsc3B==' }
      })
          .then(function (response) {
              $scope.names = response.data;
          });
  });
  &lt;/script&gt;
  </code></pre>