From ed29dfb984cb22a29c544d7961334caa42bd8b97 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Tue, 3 Jun 2025 12:17:52 -0400 Subject: [PATCH] Request Log Processor --- app/common/Implement/Log/Processor/Request.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; }