mirror of
https://github.com/flarum/core.git
synced 2025-07-31 13:40:20 +02:00
Additional functionality for Middleware extender
Implements the remove, insertBefore, insertAfter and replace functionality for middlewares. The IoC container now holds one array of middleware (bindings) per frontend stack - the extender operates on that array, before it is wrapped in a middleware "pipe". Fixes #1957, closes #1971.
This commit is contained in:
committed by
Franz Liedke
parent
a330a8fa28
commit
8dd3bd420b
@@ -63,9 +63,9 @@ class InstalledApp implements AppInterface
|
||||
$pipe->pipe(new OriginalMessages);
|
||||
$pipe->pipe(
|
||||
new BasePathRouter([
|
||||
$this->subPath('api') => 'flarum.api.middleware',
|
||||
$this->subPath('admin') => 'flarum.admin.middleware',
|
||||
'/' => 'flarum.forum.middleware',
|
||||
$this->subPath('api') => 'flarum.api.handler',
|
||||
$this->subPath('admin') => 'flarum.admin.handler',
|
||||
'/' => 'flarum.forum.handler',
|
||||
])
|
||||
);
|
||||
$pipe->pipe(new RequestHandler($this->container));
|
||||
|
Reference in New Issue
Block a user