设置common接口允许跨域

This commit is contained in:
lcc
2025-07-27 15:23:55 +08:00
parent 6f767ee4e4
commit dd238fe4cc
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -6,6 +6,9 @@ class Common extends CI_Controller
public function __construct()
{
parent::__construct();
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
header("Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With");
$this->load->model('area_model');
}
@@ -6,6 +6,9 @@ class Common extends CI_Controller
public function __construct()
{
parent::__construct();
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
header("Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With");
$this->load->model('area_model');
}