JFIF x x C C " } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w !1AQ aq"2B #3Rbr{
File "CensorRequestBodyFields.php"
Full Path: /var/www/laravel_filter/vendor/spatie/flare-client-php/src/FlareMiddleware/CensorRequestBodyFields.php
File size: 701 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace Spatie\FlareClient\FlareMiddleware;
use Spatie\FlareClient\Report;
class CensorRequestBodyFields implements FlareMiddleware
{
protected array $fieldNames = [];
public function __construct(array $fieldNames)
{
$this->fieldNames = $fieldNames;
}
public function handle(Report $report, $next)
{
$context = $report->allContext();
foreach ($this->fieldNames as $fieldName) {
if (isset($context['request_data']['body'][$fieldName])) {
$context['request_data']['body'][$fieldName] = '<CENSORED>';
}
}
$report->userProvidedContext($context);
return $next($report);
}
}