mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
Don't try to log requests as curl when the requests are bigger than 256kb
This commit is contained in:
@@ -308,6 +308,12 @@ class LoggedRequest implements \JsonSerializable
|
|||||||
|
|
||||||
protected function getRequestAsCurl(): string
|
protected function getRequestAsCurl(): string
|
||||||
{
|
{
|
||||||
|
$maxRequestLength = 256000;
|
||||||
|
|
||||||
|
if (strlen($this->rawRequest) > $maxRequestLength) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return (new CurlFormatter())->format(parse_request($this->rawRequest));
|
return (new CurlFormatter())->format(parse_request($this->rawRequest));
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user