This commit is contained in:
2025-12-18 15:39:44 +08:00
parent 15d54e8ffe
commit 975e7a3cd0
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ class OnRequest implements OnRequestInterface
public function __construct(public ResponseInterface $response, DataGrip $dataGrip) public function __construct(public ResponseInterface $response, DataGrip $dataGrip)
{ {
$this->responseEmitter = $this->response->emmit; $this->responseEmitter = $this->response->emmit;
$exception = \config('exception.http'); $exception = \config('servers.request.exception');
if (!in_array(ExceptionHandlerInterface::class, class_implements($exception))) { if (!in_array(ExceptionHandlerInterface::class, class_implements($exception))) {
$exception = ExceptionHandlerDispatcher::class; $exception = ExceptionHandlerDispatcher::class;
} }
+2 -2
View File
@@ -33,8 +33,8 @@ class Request implements ServerRequestInterface
*/ */
public function __construct() public function __construct()
{ {
$this->middlewares = \config('request.middlewares', []); $this->middlewares = \config('servers.request.middlewares', []);
$this->exception = \config('request.exception', ExceptionHandlerDispatcher::class); $this->exception = \config('servers.request.exception', ExceptionHandlerDispatcher::class);
} }
+3 -3
View File
@@ -74,9 +74,9 @@ class Response implements ResponseInterface
*/ */
public function __construct() public function __construct()
{ {
$this->contentType = \config('response.content-type', ContentType::JSON); $this->contentType = \config('servers.response.content-type', ContentType::JSON);
$this->headers = \config('response.headers', []); $this->headers = \config('servers.response.headers', []);
$this->emmit = \config('response.emmit', SwooleHttpResponseEmitter::class); $this->emmit = \config('servers.response.emmit', SwooleHttpResponseEmitter::class);
} }
/** /**