PHP Class Nelmio\SecurityBundle\EventListener\ContentSecurityPolicyListener

Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
ファイルを表示 Open project: nelmio/NelmioSecurityBundle Class Usage Examples

Protected Properties

Property Type Description
$compatHeaders
$enforce
$hosts
$nonce
$nonceGenerator
$report
$sha
$shaComputer

Public Methods

Method 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

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

Method Details

__construct() public method

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 method

public addScript ( $html )

addSha() public method

public addSha ( $directive, $sha )

addStyle() public method

public addStyle ( $html )

getEnforcement() public method

public getEnforcement ( )

getNonce() public method

public getNonce ( )

getReport() public method

public getReport ( )

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

onKernelRequest() public method

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

onKernelResponse() public method

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