Attention
TYPO3 v12 has reached end-of-life as of April 30th 2026 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here: TYPO3 ELTS.
RequestMiddlewares.php
Configuration/RequestMiddlewares.php
-
- Scope
- extension
- Path (Composer)
- packages/my_extension/Configuration/RequestMiddlewares.php
- Path (Classic)
- typo3conf/ext/my_extension/Configuration/RequestMiddlewares.php
Configuration of custom middleware for frontend and backend. Extensions that add middleware or disable existing middleware are configured in this file. The file must return an array with the configuration.
See Configuring middlewares for details.
EXT:some_extension/Configuration/RequestMiddlewares.php
return [
'frontend' => [
'middleware-identifier' => [
'target' => \Vendor\SomeExtension\Middleware\ConcreteClass::class,
'before' => [
'another-middleware-identifier',
],
'after' => [
'yet-another-middleware-identifier',
],
],
],
'backend' => [
'middleware-identifier' => [
'target' => \Vendor\SomeExtension\Middleware\AnotherConcreteClass::class,
'before' => [
'another-middleware-identifier',
],
'after' => [
'yet-another-middleware-identifier',
],
],
],
];
Copied!