python flask_script access to XMLHttpRequest at from origin 'http://localhost:4202' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. code example
Example: cors error in flask
from flask import Flask
from flask_cors import CORS, cross_origin
app = Flask(__name__)
CORS(app)
@app.route("/")
def helloWorld():
return "Hello world"