update request log

This commit is contained in:
2026-03-17 14:17:06 +08:00
parent ccea43d8d6
commit 8f69eb0349
3 changed files with 49 additions and 1 deletions
@@ -86,7 +86,10 @@ class RequestLogMiddleware implements MiddlewareInterface
*/
public static function sanitizeBody(array $body): array
{
$sensitive_keys = ['password', 'old_password', 'new_password', 'password_confirmation'];
$sensitive_keys = [
'password', 'old_password', 'new_password', 'password_confirmation',
'token', 'secret', 'api_key', 'access_token', 'refresh_token',
];
foreach ($body as $key => $value) {
if (in_array($key, $sensitive_keys, true)) {