title: No Access-Control-Allow-Origin for angular-cli "localhost:4200"
body: <p>I have a problem related to CORS and the needed headers.</p>
  
  <p><strong>Setup</strong>
  I run a angular project und angular-cli (localhost:4200) I want to access a via a HTTP-Request a JSON from a WebService. When I using the URL direct in the browser everything is fine and the JSON gets displayed. As soon as I send the request from my angular-app I get the following error:</p>
  
  <pre><code>  XMLHttpRequest cannot load http://t00-holcim:8888/deliveries?fields=liefer_nr,dispo_nr,lieferscheinsta…r,empfaenger_nr,bestellinfo1,bemerkung&amp;limit=3&amp;deliveryNoteDate=2017-04-27. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access. The response had HTTP status code 403.
  </code></pre>
  
  <p><strong>Here's the program code:</strong></p>
  
  <pre><code>....... 
  const headers = new Headers(); 
  headers.append('Content-Type', 'application/json; charset=utf-8'); headers.append('Access-Control-Allow-Origin', '*'); 
  const options = new RequestOptions({ method: RequestMethod.Post, headers: headers });
  
  this.http.get(this.buildURLString(), options).map(this.extractData)
                .subscribe((data) =&gt; {........}
  </code></pre>
  
  <p>I searched the net and I found that the error is related to CORS. Therefore I append to the header headers.append('Access-Control-Allow-Origin', '*'); <strong><em>but this does not help.</em></strong> </p>
  
  <p>I got extension CORS for Chrome and enable "Enable cross origin resource sharing" <strong><em>but it didn't help.</em></strong> </p>
  
  <p>Is this a configuration change on the server side or client side.</p>