Skip to content
Advertisement

Tag: flask-cors

Flask-CORS does not apply to responses returned by WSGI middleware

I have a Flask application that uses Flask-CORS, as well as a WSGI middleware that returns a custom response instead of the Flask app for some routes. For responses the middleware returns, Flask-CORS is not applied, so I’ve had to apply the CORS headers manually to that response. I tried reversing the order that the middleware and Flask-CORS are applied,

Advertisement