소스 검색

小说接口

陈德本 5 년 전
부모
커밋
912eb87cae
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      Frame/Dispatcher.php

+ 4 - 0
Frame/Dispatcher.php

@@ -60,6 +60,10 @@ class Dispatcher
      */
     public static function dispatch($customPrefix, $pathInfo = '')
     {
+        header("HTTP/1.1 200");
+        header("Access-Control-Allow-Origin: *");
+        header("Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE");
+        header("Access-Control-Allow-Headers: *");
         // 获取前缀
         $prefix = '\Heanup\\App\\' . self::convertToClassName($customPrefix) . "\\Controller";
         if (!$pathInfo) {