Extras ya enviados por processor
This commit is contained in:
@ -21,20 +21,7 @@ class NotFound
|
||||
return $handler->handle($request);
|
||||
} catch (HttpNotFoundException |
|
||||
EmptyRedis | EmptyResult | Read | Create | Update | Delete $exception) {
|
||||
$serverFilters = [
|
||||
'HTTP_',
|
||||
'QUERY_',
|
||||
'REDIRECT_',
|
||||
'REMOTE_',
|
||||
'REQUEST_',
|
||||
];
|
||||
$serverParams = array_filter($request->getServerParams(),
|
||||
fn($key) => count(array_filter($serverFilters, fn($prefix) => str_starts_with($key, $prefix))) > 0,
|
||||
ARRAY_FILTER_USE_KEY);
|
||||
$this->logger->notice($exception, [
|
||||
'Server' => $serverParams,
|
||||
'Headers' => $request->getHeaders(),
|
||||
]);
|
||||
$this->logger->notice($exception);
|
||||
$response = $this->responseFactory->createResponse(404, 'Not Found');
|
||||
if (str_contains($request->getUri()->getPath(), '/api')) {
|
||||
return $response;
|
||||
|
Reference in New Issue
Block a user