Skip to content

Commit

Permalink
Use framework client ip for context (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
LauJosefsen authored Apr 30, 2024
1 parent 62e65a5 commit f295777
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FilebeatLogging/RequestProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __invoke(LogRecord $record): LogRecord
private static function clientExtras(Request $request): array
{
return [
'ip' => $request->header('CF-Connecting-IP') ?? $request->getClientIp(),
'ip' => $request->getClientIp(),
'address' => $request->header('X-Forwarded-For'),
'geo' => [
'country_iso_code' => $request->header('CF-IPCountry'),
Expand Down

0 comments on commit f295777

Please sign in to comment.