title: atTask and AngularJS CORS header pass cookie auth
body: <p>atTask's developer forum directed me here.</p>
  
  <p>How do I setup my AngularJS controller's <code>$http.get</code> to access atTask's search api <code>mydomain/attask/api/projects/search</code> if the user is already logged in, in that browser?</p>
  
  <p>I started with:</p>
  
  <pre><code>var atTaskTA = angular.module('atTaskTA', []);
  
  atTaskTA.config(function($httpProvider) {
  
      $httpProvider.defaults.useXDomain = true;
  
      delete $httpProvider.defaults.headers.common['X-Requested-With'];
  });
  
  atTaskTA.controller('atTaskTAController', ['$scope','$http', function($scope, $http){
      $scope.data = "unknown";
      $http.get("https://mydomain.com/attask/api/project/search").success(function(data){
          console.log("Success", data);
          $scope.data = data;
      }).error(function() {
          console.log("error");
      });
  }]);
  </code></pre>
  
  <p>I am not familiar with setting up a header to pass the cookie info for authentication which I believe is what I need to do.</p>