rambo 2 anos atrás
pai
commit
f720f308d9
2 arquivos alterados com 1 adições e 1 exclusões
  1. 0 1
      app/BaseController.php
  2. 1 0
      public/index.php

+ 0 - 1
app/BaseController.php

@@ -45,7 +45,6 @@ abstract class BaseController
      */
     public function __construct(App $app)
     {
-        header('Access-Control-Allow-Origin: *');
         $this->app     = $app;
         $this->request = $this->app->request;
         // 控制器初始化

+ 1 - 0
public/index.php

@@ -11,6 +11,7 @@
 
 // [ 应用入口文件 ]
 namespace think;
+header('Access-Control-Allow-Origin: *');
 $i=strpos($_SERVER['REQUEST_URI'],'/bmap/');
 if($i!==false){
     if(isset($_SERVER["HTTP_REFERER"])){