|
@@ -14,7 +14,7 @@ class BaseController extends Controller {
|
|
|
//做一个检测,以免这个配置更新到线上。
|
|
//做一个检测,以免这个配置更新到线上。
|
|
|
if (
|
|
if (
|
|
|
$this->is_local_debug > 0
|
|
$this->is_local_debug > 0
|
|
|
- &&$_SERVER['HTTP_HOST'] != '127.0.0.1'
|
|
|
|
|
|
|
+ && strpos($_SERVER['HTTP_HOST'],'127.0.0.1') === false
|
|
|
&& $_SERVER['HTTP_HOST'] != 'wu.com'
|
|
&& $_SERVER['HTTP_HOST'] != 'wu.com'
|
|
|
&& strpos($_SERVER['HTTP_HOST'], "192.168") == false
|
|
&& strpos($_SERVER['HTTP_HOST'], "192.168") == false
|
|
|
){
|
|
){
|
|
@@ -95,7 +95,7 @@ class BaseController extends Controller {
|
|
|
if ($this->is_local_debug > 0 ) {
|
|
if ($this->is_local_debug > 0 ) {
|
|
|
header('Access-Control-Allow-Origin: *');//允许跨域请求
|
|
header('Access-Control-Allow-Origin: *');//允许跨域请求
|
|
|
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Connection, User-Agent, Cookie');
|
|
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Connection, User-Agent, Cookie');
|
|
|
- header('Access-Control-Allow-Credentials : true');//允许跨域请求
|
|
|
|
|
|
|
+ header('Access-Control-Allow-Credentials: true');//允许跨域请求
|
|
|
}
|
|
}
|
|
|
echo json_encode($result);
|
|
echo json_encode($result);
|
|
|
|
|
|