title: issue with flask-cors - blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status
body: <p>I'm a newbie in flask and angular please bear with me.</p>
  
  <p>I've been stuck with an issue about CORS. I've applied different code fixes just to make it work. Now the error that I am getting is</p>
  
  <pre><code>Access to XMLHttpRequest at 'http://localhost:5000/dashboard/clientscount/2019/2020' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
  </code></pre>
  
  <p>I think the answer to my problem is from the answered question on this post: <a href="https://stackoverflow.com/questions/53298478/has-been-blocked-by-cors-policy-response-to-preflight-request-doesn-t-pass-acce">Has been blocked by CORS policy: Response to preflight request doesn’t pass access control check</a>, specifcally this code</p>
  
  <pre><code>if r.Method == "OPTIONS" {
      w.WriteHeader(http.StatusOK)
      return
  }
  </code></pre>
  
  <p>but this is in go language. I'm working in flask. my question is how do I make this in flask? also in the reference answer, it says to respond to the initial request but I'm not sure how to proceed with that one.</p>
  
  <p>If you could point me in the right direction or docs, I'd gladly appreciate it.</p>