From 32d665ac6870f92cd72e766df27dc53b4a0e52fc Mon Sep 17 00:00:00 2001 From: jshixiong <2645476194@qq.com> Date: Mon, 12 May 2025 18:10:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index ab66b2a..404dcf8 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -9,8 +9,8 @@ from .route.route import route_bp def create_app(): app = Flask(__name__) - # CORS(app, resources={r"/*": {"origins": "*"}}) # 允许所有源访问所有端点 - CORS(app, resources={r"/*": {"origins": ["http://172.16.100.126", "http://113.246.243.98:61136"]}}, supports_credentials=True) + CORS(app, resources={r"/*": {"origins": "*", "methods": "GET,POST,PUT,DELETE,OPTIONS"}}) # 允许所有源访问所有端点 + # CORS(app, resources={r"/*": {"origins": ["http://172.16.100.126", "http://113.246.243.98:61136"]}}, supports_credentials=True) app.register_blueprint(route_bp)