Firesphere\CSPHeaders\Extensions\ControllerCSPExtension
Class \Firesphere\CSPHeaders\Extensions\ControllerCSPExtension
This extension is applied to the PageController, to avoid duplicates.
Any duplicates may be caused by extended classes. It should however, not affect the outcome
Synopsis
class ControllerCSPExtension
extends Extension
{
- // members
- protected static $csp_config;
- protected static array $inlineJS = ;
- protected static array $inlineCSS = ;
- protected bool $addPolicyHeaders;
- protected $nonce;
- protected array $headTags = ;
- // methods
- public static void addJS()
- public static void addCSS()
- public static array getInlineJS()
- public static array getInlineCSS()
- public void onBeforeInit()
- public static bool checkCookie()
- public null|string getNonce()
- protected void addCSP()
- protected void addInlineJSPolicy()
- protected void addInlineCSSPolicy()
- protected void addResponseHeaders()
- public bool isAddPolicyHeaders()
Hierarchy
Extends
- SilverStripe\Core\Extension
Members
protected
- $addPolicyHeaders
—
Firesphere\CSPHeaders\Extensions\bool
Should we generate the policy headers or not - $csp_config
—
array
Base CSP configuration - $headTags — array
- $inlineCSS — array
- $inlineJS — array
- $nonce — string
Methods
protected
public
- addCSS()
- addJS()
- checkCookie()
- getInlineCSS()
- getInlineJS()
- getNonce()
- isAddPolicyHeaders()
- onBeforeInit() — Add the needed headers from the database and config