|
@@ -60,6 +60,10 @@ class Dispatcher
|
|
|
*/
|
|
*/
|
|
|
public static function dispatch($customPrefix, $pathInfo = '')
|
|
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";
|
|
$prefix = '\Heanup\\App\\' . self::convertToClassName($customPrefix) . "\\Controller";
|
|
|
if (!$pathInfo) {
|
|
if (!$pathInfo) {
|