title: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://xxx:xx/register
body: <p>I'm following this project <a href="https://github.com/auth0-blog/angular2-authentication-sample" rel="nofollow noreferrer">angular2-authentication-sample</a> for angular2 js for authentication. I'm getting this problem <code>Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8000/api/auth/register. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).</code> when requesting to an signup endpoint.</p>
  <p>I check different question and i added extra header in <a href="https://github.com/auth0-blog/angular2-authentication-sample/blob/master/src/common/headers.ts" rel="nofollow noreferrer">headers</a>.</p>
  <h1>headers.ts</h1>
  <pre><code>import { Headers } from '@angular/http';
  
  export const contentHeaders = new Headers();
  contentHeaders.append('Accept', 'application/json');
  contentHeaders.append('Content-Type', 'application/json');
  contentHeaders.append('Access-Control-Allow-Origin', '*');
  contentHeaders.append('Access-Control-Request-Method', '*');
  contentHeaders.append('Access-Control-Allow-Methods', '');
  contentHeaders.append('Access-Control-Request-Headers', 'Origin, Content-Type, Accept');
  </code></pre>
  <p>I'm not able to slove this CROS problem.</p>