Csp
extends AbstractHelper
in package
Content Security Policy view helper
Tags
Table of Contents
- $nonce : string
- $response : Response|null
- __construct() : mixed
- Constructor
- disablePolicy() : void
- Disable Content Security Policy by removing the headers
- getNonce() : string
- Return the current nonce
Properties
$nonce
protected
string
$nonce
$response
protected
Response|null
$response
Methods
__construct()
Constructor
public
__construct(Response|null $response, string $nonce) : mixed
Parameters
- $response : Response|null
-
HTTP Response, if any
- $nonce : string
-
CSP nonce
Return values
mixed —disablePolicy()
Disable Content Security Policy by removing the headers
public
disablePolicy() : void
Return values
void —getNonce()
Return the current nonce
public
getNonce() : string
Result is a base64 encoded string that does not need escaping.