title: can't set HTTP Authorization header on Angular 5?
body: <p>I am working on @angular/http@5.2.6, try to send a GET http request with Authorization header, but on the server side I can't get access the Authorization header.</p>
  
  <p>I used the chrome to debug the GET http header,found the Authorization was set on Access-Control-Request-Headers, as shown below, that is the reason why the server side can't get the Authorization header.</p>
  
  <p><a href="https://i.stack.imgur.com/OtEkb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OtEkb.png" alt="enter image description here"></a></p>
  
  <p>This is my angular code, but I can't see why it is wrong. Can anyone spot the problem?</p>
  
  <pre><code>import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
  
    constructor(private http: HttpClient) { }
  
    // 获取TOKEN
    getToken() {
      if (localStorage.getItem('auth_token')) {
        console.log(localStorage.getItem('auth_token'),'getToken');
        this.headers = new HttpHeaders({
                'Content-Type': ' application/json',
                'Authorization': 'bearer ' + localStorage.getItem('auth_token')
             });
  
        console.log('getToken',this.headers);
      }
    }
  
    get(url?: string) {
      this.getToken();
      return this.http.get(url, { headers : this.headers } ).pipe(catchError(e =&gt; this.handleError.bind(this)));
    }
  </code></pre>