mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 16:26:37 +03:00
52 lines
1.4 KiB
PHP
52 lines
1.4 KiB
PHP
<?php
|
|
use Shlinkio\Shlink\Common\Middleware\LocaleMiddleware;
|
|
use Shlinkio\Shlink\Rest\Middleware\BodyParserMiddleware;
|
|
use Shlinkio\Shlink\Rest\Middleware\CheckAuthenticationMiddleware;
|
|
use Shlinkio\Shlink\Rest\Middleware\CrossDomainMiddleware;
|
|
use Shlinkio\Shlink\Rest\Middleware\PathVersionMiddleware;
|
|
use Zend\Expressive\Container\ApplicationFactory;
|
|
use Zend\Stratigility\Middleware\ErrorHandler;
|
|
|
|
return [
|
|
|
|
'middleware_pipeline' => [
|
|
'pre-routing' => [
|
|
'middleware' => [
|
|
ErrorHandler::class,
|
|
LocaleMiddleware::class,
|
|
],
|
|
'priority' => 11,
|
|
],
|
|
'pre-routing-rest' => [
|
|
'path' => '/rest',
|
|
'middleware' => [
|
|
PathVersionMiddleware::class,
|
|
],
|
|
'priority' => 11,
|
|
],
|
|
|
|
'routing' => [
|
|
'middleware' => [
|
|
ApplicationFactory::ROUTING_MIDDLEWARE,
|
|
],
|
|
'priority' => 10,
|
|
],
|
|
|
|
'rest' => [
|
|
'path' => '/rest',
|
|
'middleware' => [
|
|
CrossDomainMiddleware::class,
|
|
BodyParserMiddleware::class,
|
|
CheckAuthenticationMiddleware::class,
|
|
],
|
|
'priority' => 5,
|
|
],
|
|
|
|
'post-routing' => [
|
|
'middleware' => [
|
|
ApplicationFactory::DISPATCH_MIDDLEWARE,
|
|
],
|
|
'priority' => 1,
|
|
],
|
|
],
|
|
];
|