Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/../vendor/markbaker/.././egulias/./../phpoption/../unicodeveloper/../graham-campbell/../fruitcake/../symfony/string/../polyfill-uuid/../console/../routing/../../ezyang/../spatie/flare-client-php/./src/FlareMiddleware
الملفات الموجودة في هذا الـ Path:
.
..
AddDocumentationLinks.php
AddEnvironmentInformation.php
AddGitInformation.php
AddGlows.php
AddNotifierName.php
AddSolutions.php
CensorRequestBodyFields.php
CensorRequestHeaders.php
FlareMiddleware.php
RemoveRequestIp.php

مشاهدة ملف: CensorRequestBodyFields.php

<?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);
    }
}