title: Response for preflight has invalid HTTP status code 403 + angular 2 + Java Spring boot
body: <p>I am making an API GET call to the server with following headers in angular 2. My angular 2 code is as follows:</p>
  
  <pre><code>let headers = new Headers();
  headers.append('Content-Type', 'application/json');
  headers.append('Authorization', `${this.publisherAccessTokenVar}`);
  
  let options = new RequestOptions({ headers: headers });
  
  return this.http.get( 'https://blahblah', options)
              .retryWhen((error) =&gt; error.delay(this.appConfig.serviceCallRetryDelay))
              .timeout(this.appConfig.serviceCallRetryTimeOut)
              .map((response: Response) =&gt; response.json());
  </code></pre>
  
  <p>MY spring boot CORS code is as follows:</p>
  
  <pre><code>HttpServletResponse response = (HttpServletResponse) res;
          response.setHeader("Access-Control-Allow-Origin", ((HttpServletRequest) req).getHeader("Origin"));
          response.setHeader("Access-Control-Allow-Credentials", "true");
          response.setHeader("Access-Control-Allow-Methods", "POST,PUT, GET, OPTIONS, DELETE");
          response.setHeader("Access-Control-Max-Age", "3600");
          response.setHeader("Access-Control-Allow-Headers", "Access-Control-Request-Method,Access-Control-Request-Headers,Content-Type, Accept, X-Requested-With, remember-me, Authorization, X-XSRF-TOKEN");
          chain.doFilter(req, res);
  </code></pre>
  
  <p>I am getting following error:</p>
  
  <pre><code>OPTIONS http://blah-blah.com/abcd/logout 403 (Forbidden)
  XMLHttpRequest cannot load http://blah-blah.com/abcd/logout. Response for preflight has invalid HTTP status code 403
  </code></pre>
  
  <p>How to solve this??</p>