PolicyProvider

FinalYes

Provide a Content-Security-Policy representation for a given scope (e.g. backend, frontend, frontend.my-site).

Internal
Attributes
#[Autoconfigure]
$public: true

Table of Contents

Constants

REPORTING_URI  = '@http-reporting'

Methods

__construct()  : mixed
getDefaultReportingUriBase()  : UriInterface
Returns the URI base, for better partitioning it should be extended by `&requestTime=...`
getReportingUrlFor()  : UriInterface|null
provideFor()  : Policy
Provides the complete, dynamically mutated policy to be used in HTTP responses.

Constants

REPORTING_URI

protected mixed REPORTING_URI = '@http-reporting'

Methods

__construct()

public __construct(RequestId $requestId, SiteFinder $siteFinder, PolicyRegistry $policyRegistry, EventDispatcherInterface $eventDispatcher, MutationRepository $mutationRepository, BackendEntryPointResolver $backendEntryPointResolver) : mixed
Parameters
$requestId : RequestId
$siteFinder : SiteFinder
$policyRegistry : PolicyRegistry
$eventDispatcher : EventDispatcherInterface
$mutationRepository : MutationRepository
$backendEntryPointResolver : BackendEntryPointResolver

getDefaultReportingUriBase()

Returns the URI base, for better partitioning it should be extended by `&requestTime=...`

public getDefaultReportingUriBase(Scope $scope, ServerRequestInterface $request[, bool $absolute = true ]) : UriInterface
Parameters
$scope : Scope
$request : ServerRequestInterface
$absolute : bool = true
Return values
UriInterface

getReportingUrlFor()

public getReportingUrlFor(Scope $scope, ServerRequestInterface $request) : UriInterface|null
Parameters
$scope : Scope
$request : ServerRequestInterface
Return values
UriInterface|null

provideFor()

Provides the complete, dynamically mutated policy to be used in HTTP responses.

public provideFor(Scope $scope[, Disposition $disposition = Disposition::enforce ][, ServerRequestInterface|null $request = null ]) : Policy
Parameters
$scope : Scope
$disposition : Disposition = Disposition::enforce
$request : ServerRequestInterface|null = null
Return values
Policy

        
On this page

Search results