ContentSecurityPolicyReporter extends AbstractContentSecurityPolicyReporter

Internal

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

Methods

process()

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface

anonymizeDetails()

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
string

getRequestQueryParam()

protected getRequestQueryParam(ServerRequestInterface $request, string $name) : string|null
Parameters
$request : ServerRequestInterface
$name : string
Return values
string|null

isCspReport()

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
bool

isJson()

protected isJson(string $value) : bool
Parameters
$value : string
Return values
bool

persistCspReport()

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
Return values
bool

        
On this page

Search results