添加跨域

添加服务后台添加
This commit is contained in:
2025-12-23 10:27:54 +08:00
parent c61a34ec7d
commit eeb443b225
7 changed files with 5 additions and 0 deletions

View File

View File

View File

View File

View File

@@ -0,0 +1 @@
13123131

View File

@@ -26,6 +26,10 @@ use think\facade\Config;
use think\facade\Debug; use think\facade\Debug;
use think\Response; use think\Response;
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");
header("Access-Control-Allow-Headers: Content-Type, Authorization");
class ApiBase extends Controller class ApiBase extends Controller
{ {
public $user_info = []; public $user_info = [];