summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-05-24 21:42:37 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-07-08 20:35:15 +0200
commit5ac857bcdcd204d6dbfd86f8a09d241661cdd2c5 (patch)
tree4a02f63a1f9a2ced4e3565e97ad628c612aef5c9 /lib/private/Server.php
parenteb092bbdc74fd10253e7a75850d5725df27daa25 (diff)
downloadnextcloud-server-5ac857bcdcd204d6dbfd86f8a09d241661cdd2c5.tar.gz
nextcloud-server-5ac857bcdcd204d6dbfd86f8a09d241661cdd2c5.zip
Add an event to edit the CSP
This introduces and event that can be listend to when we actually use the CSP. This means that apps no longer have to always inject their CSP but only do so when it is required. Yay for being lazy. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 6a2d8106fb6..e10967debb4 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -1029,10 +1029,8 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerService(SessionStorage::class, function (Server $c) {
return new SessionStorage($c->getSession());
});
- $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) {
- return new ContentSecurityPolicyManager();
- });
- $this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class);
+ $this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, \OC\Security\CSP\ContentSecurityPolicyManager::class);
+ $this->registerAlias('ContentSecurityPolicyManager', \OC\Security\CSP\ContentSecurityPolicyManager::class);
$this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) {
return new ContentSecurityPolicyNonceManager(