mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 21:18:11 -04:00
fix(api): use the Cloudflare client IP for allowed IPs and audit logs
Closes #12301 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0f0a1e920d
commit
80ce0efe7e
@@ -200,7 +200,7 @@ class AuditEvent extends Model
|
||||
?? trim(($resourceName ?? Str::headline((string) $resourceType)).' '.Str::headline($action)),
|
||||
'metadata' => self::redact(Arr::except($context, ['audit_changes'])),
|
||||
'changes' => $changes,
|
||||
'ip_address' => app()->bound('request') ? request()->ip() : null,
|
||||
'ip_address' => app()->bound('request') ? (client_ip(request()) ?: null) : null,
|
||||
'user_agent' => app()->bound('request') ? Str::limit((string) request()->userAgent(), 200, '') : null,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user