Flask Cors isn't working Flask Cors isn't working flask flask

Flask Cors isn't working


You have two issues:

  1. The key provided to resources must be a valid Python regular expression, according to Flask-CORS documentation - use /.* instead of /* to match anything under the root /, rather than any path which consists only of slashes (which is what /* means).
  2. The origin returned should be a fully-qualified URI matching the syntax described in RFC 6454 Section 7.1, as per the W3C's specification for CORS. www.example.com is not a fully-qualified URI as it does not have a scheme. Use https://www.example.com or http://www.example.com instead. Alternatively you can use a regular expression to tell Flask-CORS to match both with only one entry in origins.