fix(admin): use direct IP retrieval for system logs

Direct IP retrieval method has been updated to improve accuracy in the admin system log.
This change involves modifying the IP address retrieval logic from considering the
`HTTP_X_FORWARDED_FOR` header to directly using the `ip()` method, potentially enhancing
the security and reliability of IP logging.
This commit is contained in:
wolfcode
2024-08-12 15:58:23 +08:00
parent 772ffc6328
commit ed0e14cb32

View File

@@ -62,7 +62,7 @@ class SystemLog
}
}catch (\Throwable $exception) {
}
$ip = $request->server('HTTP_X_FORWARDED_FOR', $request->ip());
$ip = $request->ip();
$data = [
'admin_id' => session('admin.id'),
'title' => $title,