background There is a JS app serving at 127.0.0.1:8080, which refers some API serving at 127.0.0.1:5000 by a Flask app. [See FlaskCode] When I open this js app in Chrome, first request work well and the second request ends with CORS problem, [see ChromeDebug1]. Additionally, I found this ‘OPTIONS’…
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 o…