title: http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass
body: <p>I have a problem that I can't seem to figure out. I want to send a http params request from my Angular client to server using below code but I am getting exception:</p>
  <blockquote>
  <p>http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass</p>
  </blockquote>
  <p>I want clarity about it, did I make any mistakes in Angular or is this a server side problem?</p>
  <h2>Auth:</h2>
  <pre><code>login(username: string, password: string) {
      let params = new HttpParams();
      params = params.append('email', username);
      params = params.append('password', password);
      return this.http.post&lt;any&gt;('URL',{params:params})
        .pipe(map(user =&gt; {
          if (user &amp;&amp; user.token) {
          }
        }),
          catchError(this.handleError)
        );
    }
  </code></pre>