添加跨域

添加服务后台添加
This commit is contained in:
2025-12-23 10:40:05 +08:00
parent 3482382734
commit 2f79f7fbcd

View File

@@ -14,6 +14,10 @@ namespace think;
use think\exception\ValidateException; use think\exception\ValidateException;
use traits\controller\Jump; use traits\controller\Jump;
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");
header("Access-Control-Allow-Headers: Content-Type, Authorization, version");
class Controller class Controller
{ {
use Jump; use Jump;