安装
pip install flask_cors
使用
from flask_cors import CORS app = Flask(__name__) CORS(app, supports_credentials=True)