summaryrefslogtreecommitdiff
path: root/app/Core/Plugin/Base.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-10 18:59:06 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-10 18:59:06 -0400
commit0e233673e32ffff50dd9392fb3c371a9fff8bf0a (patch)
treef7e3b24813c28f122de1b42dcf3784faabb3ae2f /app/Core/Plugin/Base.php
parente3521db6a83639b409e2dd7abb19417f3ac0a9cd (diff)
Allow plugins to override CSP rules
Diffstat (limited to 'app/Core/Plugin/Base.php')
-rw-r--r--app/Core/Plugin/Base.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/Core/Plugin/Base.php b/app/Core/Plugin/Base.php
index a72a0cd6..1b7ac8f5 100644
--- a/app/Core/Plugin/Base.php
+++ b/app/Core/Plugin/Base.php
@@ -19,6 +19,17 @@ abstract class Base extends \Core\Base
abstract public function initialize();
/**
+ * Override default CSP rules
+ *
+ * @access public
+ * @param array $rules
+ */
+ public function setContentSecurityPolicy(array $rules)
+ {
+ $this->container['cspRules'] = $rules;
+ }
+
+ /**
* Returns all classes that needs to be stored in the DI container
*
* @access public