From 0e233673e32ffff50dd9392fb3c371a9fff8bf0a Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 10 Oct 2015 18:59:06 -0400 Subject: Allow plugins to override CSP rules --- app/Core/Plugin/Base.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/Core') 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 @@ -18,6 +18,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 * -- cgit v1.2.3