Skip to content

Commit

Permalink
Extract IP from the request
Browse files Browse the repository at this point in the history
  • Loading branch information
SaptarshiDy committed Oct 23, 2024
1 parent 3048a2e commit a7e65d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Watchers/RequestWatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function recordRequest(RequestHandled $event)

$startTime = defined('LARAVEL_START') ? LARAVEL_START : $event->request->server('REQUEST_TIME_FLOAT');

$ip = $event->request->ip();
$ip = $event->request->header('X-Real-IP') ?? $event->request->ip();
// $ip = '216.57.45.241';

$visitor_ip = VisitorIpModel::where('ip_address', $ip)->first();
Expand Down

0 comments on commit a7e65d0

Please sign in to comment.