aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/DependencyInjection/DIContainer.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework/DependencyInjection/DIContainer.php')
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index f21b34a6b4a..32a85606abf 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -38,6 +38,7 @@ use OC\AppFramework\Http\Dispatcher;
use OC\AppFramework\Http\Output;
use OC\AppFramework\Middleware\MiddlewareDispatcher;
use OC\AppFramework\Middleware\Security\CORSMiddleware;
+use OC\AppFramework\Middleware\OCSMiddleware;
use OC\AppFramework\Middleware\Security\SecurityMiddleware;
use OC\AppFramework\Middleware\SessionMiddleware;
use OC\AppFramework\Utility\SimpleContainer;
@@ -373,6 +374,12 @@ class DIContainer extends SimpleContainer implements IAppContainer {
return new TwoFactorMiddleware($twoFactorManager, $userSession, $session, $urlGenerator, $reflector, $request);
});
+ $this->registerService('OCSMiddleware', function (SimpleContainer $c) {
+ return new OCSMiddleware(
+ $c['Request']
+ );
+ });
+
$middleWares = &$this->middleWares;
$this->registerService('MiddlewareDispatcher', function($c) use (&$middleWares) {
$dispatcher = new MiddlewareDispatcher();
@@ -385,6 +392,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
}
$dispatcher->registerMiddleware($c['SessionMiddleware']);
+ $dispatcher->registerMiddleware($c['OCSMiddleware']);
return $dispatcher;
});