mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix the middleware registration process in the container
This commit is contained in:
parent
2fc6fb36ad
commit
763da4258e
1 changed files with 2 additions and 3 deletions
|
|
@ -92,12 +92,11 @@ class DIContainer extends SimpleContainer implements IAppContainer{
|
|||
return new SecurityMiddleware($app, $c['Request']);
|
||||
});
|
||||
|
||||
$middleWares = $this->middleWares;
|
||||
$this['MiddlewareDispatcher'] = $this->share(function($c) use ($middleWares) {
|
||||
$this['MiddlewareDispatcher'] = $this->share(function($c) {
|
||||
$dispatcher = new MiddlewareDispatcher();
|
||||
$dispatcher->registerMiddleware($c['SecurityMiddleware']);
|
||||
|
||||
foreach($middleWares as $middleWare) {
|
||||
foreach($this->middleWares as $middleWare) {
|
||||
$dispatcher->registerMiddleware($c[$middleWare]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue