安装
pip install -U flask-cors
from flask import Flask
from flask_cors import CORSapp = Flask(__name__)
CORS(app)@app.route("/")
def helloWorld():return "Hello, cross-origin-world!"
参考
https://www.cnblogs.com/anxminise/p/9814326.html
官方文档
https://flask-cors.readthedocs.io/en/latest/