title: How set "Access-Control-Allow-Origin" in angular 5?
body: <p>I am trying to do get request from angular 5 as below:</p>
  
  <pre><code>public showHeatMap(){
          console.log("in showHeatMap")
          let headers = new Headers();
          headers.append('Access-Control-Allow-Origin' , '*');
  /*      
          headers: new HttpHeaders({
              'Content-Type':  'image/png',
              'Access-Control-Allow-Origin': '*'
          }) */
          this.http.get(this.showHeatMapURL,{headers: headers}).toPromise().then((res)=&gt;{
              console.log("reading response....")
              console.log(res);
        });
      }
  </code></pre>
  
  <p>but it gives me error as "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."</p>