AddContentSecurityPolicyEvent

class OCP\Security\CSP\AddContentSecurityPolicyEvent
Allows to inject something into the default content policy. This is for
example useful when you’re injecting Javascript code into a view belonging
to another controller and cannot modify its Content-Security-Policy itself.
Note that the adjustment is only applied to applications that use AppFramework
controllers.

WARNING: Using this API incorrectly may make the instance more insecure.
Do think twice before adding whitelisting resources. Please do also note
that 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