Python/Flask Rest API not passing preflight w/CORS Python/Flask Rest API not passing preflight w/CORS flask flask

Python/Flask Rest API not passing preflight w/CORS


Revisiting this after a few months.

One of the nasty gotchas in python/flask appears to be that the compiled code will get cached, so if you change something at the entrypoint of the app (ie main.py), and don't delete the binaries that flask export creates then every time you run flask export and recompile it may be using old code!

Make sure to delete (in atom they are the purple 1/0 files -if you have file icons enabled- labeled .pyc) these files if you are getting spooky output.


Add OPTIONS to the methods keyword of your route decorator, or remove that keyword altogether.