title: Angular.js HTTP request fails
body: <p>I'm very new to web development so I need help.
  I'd like to send an HTTP request to a web server to get some data. To authorise the user I have to send a secret in the user agent header.</p>
  
  <pre><code>$http({
          method: 'GET',
          url: 'https://my-website/some_data',
          headers: {
              'Accept': 'application/json;charset=UTF-8',
              'User-Agent': 'service/2.0 (Android 4.3) sec=secret_key'
          }
  
       }).success(function(data){
          $scope.locations = data;
      }).error(function(data, status, headers, config) {
          alert("error");
      });
  </code></pre>
  
  <p>The problem is Chrome always prints:</p>
  
  <pre><code>Refused to set unsafe header "User-Agent"
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>XMLHttpRequest cannot load
  https://my-website/some_data. No
  'Access-Control-Allow-Origin' header is present on the requested
  resource. Origin 'http://127.XXXXX' is therefore not allowed
  access. The response had HTTP status code 403.
  </code></pre>
  
  <p>What went wrong? </p>