mirror of https://gitee.com/karson/fastadmin.git
优化POST请求过大时日志记录
parent
53e916eeb7
commit
4b6c209575
|
|
@ -67,6 +67,10 @@ class AdminLog extends Model
|
||||||
$content = $content ?: self::$content;
|
$content = $content ?: self::$content;
|
||||||
if (!$content) {
|
if (!$content) {
|
||||||
$content = request()->param('') ?: file_get_contents("php://input");
|
$content = request()->param('') ?: file_get_contents("php://input");
|
||||||
|
$contentLength = request()->server('CONTENT_LENGTH');
|
||||||
|
if (is_string($content) && $contentLength && strlen($content) < $contentLength) {
|
||||||
|
$content = '[Request Data Truncated]';
|
||||||
|
}
|
||||||
$content = self::getPureContent($content);
|
$content = self::getPureContent($content);
|
||||||
}
|
}
|
||||||
$title = $title ?: self::$title;
|
$title = $title ?: self::$title;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue