b20174bdad
This change allows AppFramework applications to specify a custom CSP header for example when the default policy is too strict. Furthermore this allows us to partially migrate away from CSS and allowed eval() in our JavaScript components. Legacy ownCloud components will still use the previous policy. Application developers can use this as following in their controllers: ```php $response = new TemplateResponse('activity', 'list', []); $cspHelper = new ContentSecurityPolicyHelper(); $cspHelper->addAllowedScriptDomain('www.owncloud.org'); $response->addHeader('Content-Security-Policy', $cspHelper->getPolicy()); return $response; ``` Fixes https://github.com/owncloud/core/issues/11857 which is a pre-requisite for https://github.com/owncloud/core/issues/13458 and https://github.com/owncloud/core/issues/11925 |
||
---|---|---|
.. | ||
acceptance | ||
core/lostpassword/controller | ||
data | ||
lib | ||
settings | ||
apps.php | ||
bootstrap.php | ||
enable_all.php | ||
karma.config.js | ||
phpunit-autotest-external.xml | ||
phpunit-autotest.xml | ||
phpunit.xml.dist | ||
preseed-config.php | ||
startsessionlistener.php |