设置common接口允许跨域
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user