Getting CORS to work with Flask
If you've ever created a web application you might have run into difficulties with Cross Origin Resource Sharing which is commonly referred to by its acronym CORS.
Recently I've been looking at some web projects and I ran into a particularly annoying issue with getting CORS to work with Flask. This particular project was using Flask-CORS to do the necessary CORS handling.
It turns out that if you use blueprints with Flask then CORS is not automatically applied to these blueprints. You have to manually enable CORS on each and every blueprint. There's an open issue about this from 2019 but as far as I can tell this is still the case in 2021.