from flask_cors import CORSapp = Flask(__name__) cors = CORS(app, resources={r"/.*": {"origins": ["http://192.168.1.5:8081","http://www.baidu.com"]}}) # 只允许特定几个域名跨域