Fix missing user agent headers to store an empty string rather than null value
This commit is contained in:
parent
5e5d7d6689
commit
7b429831ce
1 changed files with 2 additions and 2 deletions
|
@ -120,8 +120,8 @@ class AuditLog extends Model
|
||||||
'server_id' => null,
|
'server_id' => null,
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
'device' => $request ? [
|
'device' => $request ? [
|
||||||
'ip_address' => $request->getClientIp(),
|
'ip_address' => $request->getClientIp() ?? '127.0.0.1',
|
||||||
'user_agent' => $request->userAgent(),
|
'user_agent' => $request->userAgent() ?? '',
|
||||||
] : [],
|
] : [],
|
||||||
'metadata' => $metadata,
|
'metadata' => $metadata,
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue