Skip to content

Commit

Permalink
updated logging for account events
Browse files Browse the repository at this point in the history
  • Loading branch information
MelonSmasher committed Dec 12, 2017
1 parent 9ea7d57 commit b80207f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/Events/Api/Authentication/AuthenticationFailure.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ class AuthenticationFailure extends Event
public function __construct(Request $request)
{

$logMessage = \Request::ip() . ' failed to authenticated with the API - ';
$ip = \Request::ip();
$proxyIP = null;
if (!empty($_SERVER['HTTP_X_REAL_IP'])) {
$proxyIP = $ip;
$ip = $_SERVER['HTTP_X_REAL_IP'];
}

$logMessage = $ip . ' failed to authenticated with the API - ';
$logContext = [
'requester_ip' => \Request::ip(),
'proxy_ip' => $proxyIP,
'requester_ip' => $ip,
'request' => $request->toArray()
];

Expand Down

0 comments on commit b80207f

Please sign in to comment.