From a10cfc066a54fa2debf1a41cc051692710d5aaea Mon Sep 17 00:00:00 2001 From: ASUS <515617283@qq.com> Date: Fri, 15 Aug 2025 09:35:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index cc46f0a..37a2ea5 100644 --- a/public/index.php +++ b/public/index.php @@ -4,7 +4,10 @@ */ use support\App; - +header('Access-Control-Allow-Origin: *'); // 允许所有域访问 +header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS'); +header('Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept, Origin, Authorization'); +header('Access-Control-Allow-Credentials: true'); // 允许发送Cookie等认证信息 chdir(__DIR__); require_once __DIR__ . '/../vendor/autoload.php';