AddContentSecurityPolicyEvent¶
-
class
OCP\Security\CSP\
AddContentSecurityPolicyEvent
¶ - Allows to inject something into the default content policy. This is forexample useful when you’re injecting Javascript code into a view belongingto another controller and cannot modify its Content-Security-Policy itself.Note that the adjustment is only applied to applications that use AppFrameworkcontrollers.WARNING: Using this API incorrectly may make the instance more insecure.Do think twice before adding whitelisting resources. Please do also notethat it is not possible to use the `disallowXYZ` functions.
Source: lib/public/Security/CSP/AddContentSecurityPolicyEvent.php#48 Parent: OCP\EventDispatcher\Event
Properties¶
Methods¶
-
public
OCP\Security\CSP\AddContentSecurityPolicyEvent::
__construct
($policyManager)¶ Source: lib/public/Security/CSP/AddContentSecurityPolicyEvent.php#56 Since: 17.0.0
-
public
OCP\Security\CSP\AddContentSecurityPolicyEvent::
addPolicy
($csp)¶ Source: lib/public/Security/CSP/AddContentSecurityPolicyEvent.php#64 Since: 17.0.0