SecurityPolicy
This documentation is for an outdated Matomo version.
Click here if you want to read this article for the latest version.
Click here if you want to read this article for the latest version.
Piwik\View\
SecurityPolicy
Content Security Policy HTTP Header management class
Methods
The class defines the following methods:
addPolicy()— Appends a policy to a directive.removeDirective()— Removes a directive.overridePolicy()— Overrides a directive.disable()— Disable CSPallowEmbedPage()— A less restrictive CSP which will allow embedding other sites with iframes (useful for heatmaps and session recordings)
addPolicy()
Appends a policy to a directive.
Signature
It accepts the following parameter(s):
$directive$value
It does not return anything or a mixed result.
removeDirective()
Removes a directive.
Signature
It accepts the following parameter(s):
$directive
It does not return anything or a mixed result.
overridePolicy()
Overrides a directive.
Signature
It accepts the following parameter(s):
$directive$value
It does not return anything or a mixed result.
disable()
Disable CSP
Signature
- It does not return anything or a mixed result.
allowEmbedPage()
A less restrictive CSP which will allow embedding other sites with iframes (useful for heatmaps and session recordings)
Signature
- It does not return anything or a mixed result.