Flask Cors isn't working
You have two issues:
- 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). - 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. Usehttps://www.example.com
orhttp://www.example.com
instead. Alternatively you can use a regular expression to tell Flask-CORS to match both with only one entry inorigins
.