ContentSecurityPolicyReporter extends AbstractContentSecurityPolicyReporter
Table of Contents
Constants
- URI_KEYS = ['document-uri', 'report-uri', 'blocked-uri', 'referrer']
Properties
- $dispositionMapFactory : DispositionMapFactory
- $hashService : HashService
- $policyProvider : PolicyProvider
- $reportRepository : ReportRepository
Methods
- __construct() : mixed
- process() : ResponseInterface
- anonymizeDetails() : array<string|int, mixed>
- anonymizeUri() : string
- generateReportSummary() : string
- getRequestQueryParam() : string|null
- isCspReport() : bool
- Determines, whether the request is eligible to be handled by the local reporting URI (`targetsCspReportUri()` must have been called before).
- isJson() : bool
- persistCspReport() : void
- targetsCspReportUri() : bool
- Determines, whether current request URI starts with local reporting URI, (e.g. `https://ip12.anyhost.it:8443/en/@http-reporting?csp=report`).
Constants
URI_KEYS
    protected
        mixed
    URI_KEYS
    = ['document-uri', 'report-uri', 'blocked-uri', 'referrer']
    
    
    
    
Properties
$dispositionMapFactory read-only
        protected
            DispositionMapFactory
    $dispositionMapFactory
    
    
    
    
    
    
$hashService read-only
        protected
            HashService
    $hashService
    
    
    
    
    
    
$policyProvider read-only
        protected
            PolicyProvider
    $policyProvider
    
    
    
    
    
    
$reportRepository read-only
        protected
            ReportRepository
    $reportRepository
    
    
    
    
    
    
Methods
__construct()
    public
                    __construct(PolicyProvider $policyProvider, DispositionMapFactory $dispositionMapFactory, ReportRepository $reportRepository, HashService $hashService) : mixed
    Parameters
- $policyProvider : PolicyProvider
- $dispositionMapFactory : DispositionMapFactory
- $reportRepository : ReportRepository
- $hashService : HashService
process()
    public
                    process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface
Return values
ResponseInterfaceanonymizeDetails()
    protected
                    anonymizeDetails(array<string|int, mixed> $details) : array<string|int, mixed>
    Parameters
- $details : array<string|int, mixed>
Return values
array<string|int, mixed>anonymizeUri()
    protected
                    anonymizeUri(string $value) : string
    Parameters
- $value : string
Return values
stringgenerateReportSummary()
    protected
                    generateReportSummary(Scope $scope, ReportDetails $details) : string
    Parameters
- $scope : Scope
- $details : ReportDetails
Return values
stringgetRequestQueryParam()
    protected
                    getRequestQueryParam(ServerRequestInterface $request, string $name) : string|null
    Parameters
- $request : ServerRequestInterface
- $name : string
Return values
string|nullisCspReport()
Determines, whether the request is eligible to be handled by the local reporting URI (`targetsCspReportUri()` must have been called before).
    protected
                    isCspReport(Scope $scope, ServerRequestInterface $request[, DispositionConfiguration|null $dispositionConfiguration = null ]) : bool
    Parameters
- $scope : Scope
- $request : ServerRequestInterface
- $dispositionConfiguration : DispositionConfiguration|null = null
Return values
boolisJson()
    protected
                    isJson(string $value) : bool
    Parameters
- $value : string
Return values
boolpersistCspReport()
    protected
                    persistCspReport(Scope $scope, ServerRequestInterface $request) : void
    Parameters
- $scope : Scope
- $request : ServerRequestInterface
targetsCspReportUri()
Determines, whether current request URI starts with local reporting URI, (e.g. `https://ip12.anyhost.it:8443/en/@http-reporting?csp=report`).
    protected
                    targetsCspReportUri(Scope $scope, ServerRequestInterface $request) : bool
    Parameters
- $scope : Scope
- $request : ServerRequestInterface