改名
This commit is contained in:
@@ -29,8 +29,6 @@ class CoreMiddleware implements \HttpServer\IInterface\Middleware
|
||||
{
|
||||
$headers = $request->headers;
|
||||
|
||||
var_dump(get_called_class());
|
||||
|
||||
/** @var Response $response */
|
||||
$response = Context::getContext('response');
|
||||
$response->addHeader('Access-Control-Allow-Origin', '*');
|
||||
|
||||
@@ -471,11 +471,10 @@ class Node extends HttpService
|
||||
*/
|
||||
public function dispatch(): mixed
|
||||
{
|
||||
// if (!empty($this->callback)) {
|
||||
// return $this->runWith(...func_get_args());
|
||||
// }
|
||||
if (!empty($this->callback)) {
|
||||
return $this->runWith(...func_get_args());
|
||||
}
|
||||
if (empty($this->restructure()->callback)) {
|
||||
var_dump('404');
|
||||
return Json::to(404, $this->errorMsg());
|
||||
}
|
||||
return $this->runWith(...func_get_args());
|
||||
|
||||
@@ -21,7 +21,6 @@ class Reduce
|
||||
*/
|
||||
public static function reduce($last, $middleWares): mixed
|
||||
{
|
||||
var_export($middleWares);
|
||||
return array_reduce(array_reverse($middleWares), static::core(), $last);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user