Move default-src CSP rule to ClassProvider

It was impossible to override the default-src CSP rule inside a plugin. This commit
fixes this limitation by moving the assignation of the rule from Response class to
ClassProvider.
This commit is contained in:
Marien Fressinaud
2016-01-23 18:47:47 +01:00
parent cc93b86991
commit 8baa417ece
2 changed files with 1 additions and 1 deletions

View File

@@ -168,6 +168,7 @@ class ClassProvider implements ServiceProviderInterface
};
$container['cspRules'] = array(
'default-src' => "'self'",
'style-src' => "'self' 'unsafe-inline'",
'img-src' => '* data:',
);