PHP Class Nelmio\SecurityBundle\EventListener\ContentSecurityPolicyListener

Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Afficher le fichier Open project: nelmio/NelmioSecurityBundle Class Usage Examples

Protected Properties

Свойство Type Description
$compatHeaders
$enforce
$hosts
$nonce
$nonceGenerator
$report
$sha
$shaComputer

Méthodes publiques

Méthode Description
__construct ( DirectiveSet $report, DirectiveSet $enforce, NonceGenerator $nonceGenerator, ShaComputer $shaComputer, $compatHeaders = true, array $hosts = [], array $contentTypes = [] )
addScript ( $html )
addSha ( $directive, $sha )
addStyle ( $html )
getEnforcement ( )
getNonce ( )
getReport ( )
getSubscribedEvents ( )
onKernelRequest ( GetResponseEvent $event )
onKernelResponse ( FilterResponseEvent $e )

Private Methods

Méthode Description
buildHeaders ( Request $request, DirectiveSet $directiveSet, $reportOnly, $compatHeaders, array $signatures = null )

Method Details

__construct() public méthode

public __construct ( DirectiveSet $report, DirectiveSet $enforce, NonceGenerator $nonceGenerator, ShaComputer $shaComputer, $compatHeaders = true, array $hosts = [], array $contentTypes = [] )
$report Nelmio\SecurityBundle\ContentSecurityPolicy\DirectiveSet
$enforce Nelmio\SecurityBundle\ContentSecurityPolicy\DirectiveSet
$nonceGenerator Nelmio\SecurityBundle\ContentSecurityPolicy\NonceGenerator
$shaComputer Nelmio\SecurityBundle\ContentSecurityPolicy\ShaComputer
$hosts array
$contentTypes array

addScript() public méthode

public addScript ( $html )

addSha() public méthode

public addSha ( $directive, $sha )

addStyle() public méthode

public addStyle ( $html )

getEnforcement() public méthode

public getEnforcement ( )

getNonce() public méthode

public getNonce ( )

getReport() public méthode

public getReport ( )

getSubscribedEvents() public static méthode

public static getSubscribedEvents ( )

onKernelRequest() public méthode

public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent

onKernelResponse() public méthode

public onKernelResponse ( FilterResponseEvent $e )
$e Symfony\Component\HttpKernel\Event\FilterResponseEvent

Property Details

$compatHeaders protected_oe property

protected $compatHeaders

$enforce protected_oe property

protected $enforce

$hosts protected_oe property

protected $hosts

$nonce protected_oe property

protected $nonce

$nonceGenerator protected_oe property

protected $nonceGenerator

$report protected_oe property

protected $report

$sha protected_oe property

protected $sha

$shaComputer protected_oe property

protected $shaComputer