diff --git a/app/common/Implement/Log/Processor/Request.php b/app/common/Implement/Log/Processor/Request.php index 7dd8fdf..b195cb9 100644 --- a/app/common/Implement/Log/Processor/Request.php +++ b/app/common/Implement/Log/Processor/Request.php @@ -1,18 +1,16 @@ container->get(ServerRequestInterface::class); $serverFilters = [ 'HTTP_', 'QUERY_', @@ -20,12 +18,12 @@ class Request implements ProcessorInterface 'REMOTE_', 'REQUEST_', ]; - $serverParams = array_filter($request->getServerParams(), + $serverParams = array_filter($this->request->getServerParams(), fn($key) => count(array_filter($serverFilters, fn($prefix) => str_starts_with($key, $prefix))) > 0, ARRAY_FILTER_USE_KEY); $record->extra['request'] = [ 'server' => $serverParams, - 'headers' => $request->getHeaders(), + 'headers' => $this->request->getHeaders(), ]; return $record; }