title: Flask python API CORS issue from Angular
body: <p>I have Flask Python API with cors set up as below. It works fine when invoked from browser. But getting CORS error when called from Angular application currently testing from localhost:4200.</p>
  <p>From Chrome developer tools - Could see preflight request with Request Method=Options(Preflight request) returning 200, but actual request is throwing CORS error.  Not sure what i am doing wrong here.  Please share insights.</p>
  <p>FYI - Tried couple of tweaks like making allowed origin &quot;*&quot; , removed &quot;supports_credentials=True&quot;; still same CORS error</p>
  <p>Error:</p>
  <pre><code>Error:
  Access to XMLHttpRequest at 'https://app01.dev.com/coreengine?rootfolder=app01&amp;childfolder=jun2020&amp;team=app01&amp;action=customhierarchy' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  </code></pre>
  <p>Code:</p>
  <pre><code>from flask_cors import CORS
  mainapp = Flask(__name__)
  cors = CORS(mainapp, resources={r&quot;/*&quot;: {&quot;origins&quot;:[&quot;http://localhost:4200&quot;]}},supports_credentials=True)
  @mainapp.route('/coreengine', methods=['GET','POST'])
  def coreengine():
  {
    #Code 
  }
  </code></pre>