From 919317630eb37a13262f82cee634995e19fbadfe Mon Sep 17 00:00:00 2001 From: Ghost <106998207@qq.com> Date: Mon, 7 Apr 2025 11:44:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/route/route.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Server/route/route.php b/Server/route/route.php index 9589acf2..b2bd94d9 100755 --- a/Server/route/route.php +++ b/Server/route/route.php @@ -11,6 +11,15 @@ use think\facade\Route; + // 允许跨域 + header('Access-Control-Allow-Origin: *'); + header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, PATCH'); + header('Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With, X-Token, X-Api-Token'); + header('Access-Control-Max-Age: 1728000'); + header('Access-Control-Allow-Credentials: true'); + + + // 加载Store模块路由配置 include __DIR__ . '/../application/api/config/route.php';