소스 검색

请求头

rambo 1 년 전
부모
커밋
6784be33c6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/BaseController.php

+ 1 - 1
app/BaseController.php

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