RequestMiddlewares.php

Full path to this file is: Configuration/RequestMiddlewares.php.

Configuration of user-defined middlewares for frontend and backend. Extensions that add middlewares or disable existing middlewares configure them 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!