title: AngularJS - Cross Origin Requests Blocked
body: <p>I'm developing an AngularJS project and I'm working with an external Symfony REST api. However, my requests are blocked by Angular/JS. I did some research and added following lines to the config section of my app:</p>
  
  <pre><code>angular
  .module('appName', [
    ....
  ])
  .config(['$routeProvider', '$httpProvider', function($routeProvider, $httpProvider) {
      $httpProvider.defaults.useXDomain = true;
      delete $httpProvider.defaults.headers.common['X-Requested-With'];
  
  ..
  </code></pre>
  
  <p>However, firebug still throws an error: Cross Origin request blocked .. 
  When I look into the 'NET' tab of firebug, this is what I get: 
  <img src="https://i.stack.imgur.com/I6RTP.png" alt="NET tab screenshot"></p>
  
  <p>Any thoughts on this problem?
  Thanks in advance.</p>