I try to make a POST to a flask server using axios:
var config = { headers: { \'Content-Type\': \'application/json\',
You need to add CORS support to your Flask app. See a related threat here: Flask-CORS not working for POST, but working for GET. A popular CORS extension for Flask can be found here: https://flask-cors.readthedocs.io/en/latest/.