|
|
|
@ -8,6 +8,18 @@ class Login extends CI_Controller {
|
|
|
|
|
function __construct() {
|
|
|
|
|
parent::__construct();
|
|
|
|
|
$this->load->model('Infoauthors_model');
|
|
|
|
|
if (isset($_SERVER['HTTP_ORIGIN'])) {
|
|
|
|
|
$http_origin = $_SERVER['HTTP_ORIGIN'];
|
|
|
|
|
$allowed_domains = array(
|
|
|
|
|
'https://cht.mycht.cn',
|
|
|
|
|
'https://origin-cht.mycht.cn'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (in_array($http_origin, $allowed_domains))
|
|
|
|
|
{
|
|
|
|
|
header("Access-Control-Allow-Origin: $http_origin");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function index() {
|
|
|
|
@ -229,4 +241,4 @@ class Login extends CI_Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* End of file welcome.php */
|
|
|
|
|
/* Location: ./application/controllers/welcome.php */
|
|
|
|
|
/* Location: ./application/controllers/welcome.php */
|
|
|
|
|