mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 16:26:37 +03:00
46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
use Acelaya\UrlShortener\Middleware;
|
|
use Zend\Expressive\Container\ApplicationFactory;
|
|
use Zend\Expressive\Helper;
|
|
|
|
return [
|
|
|
|
'middleware_pipeline' => [
|
|
'always' => [
|
|
'middleware' => [
|
|
Helper\ServerUrlMiddleware::class,
|
|
],
|
|
'priority' => 10000,
|
|
],
|
|
|
|
'routing' => [
|
|
'middleware' => [
|
|
ApplicationFactory::ROUTING_MIDDLEWARE,
|
|
],
|
|
'priority' => 10,
|
|
],
|
|
|
|
'rest' => [
|
|
'path' => '/rest',
|
|
'middleware' => [
|
|
Middleware\CheckAuthenticationMiddleware::class,
|
|
Middleware\CrossDomainMiddleware::class,
|
|
],
|
|
'priority' => 5,
|
|
],
|
|
|
|
'post-routing' => [
|
|
'middleware' => [
|
|
Helper\UrlHelperMiddleware::class,
|
|
ApplicationFactory::DISPATCH_MIDDLEWARE,
|
|
],
|
|
'priority' => 1,
|
|
],
|
|
|
|
'error' => [
|
|
'middleware' => [],
|
|
'error' => true,
|
|
'priority' => -10000,
|
|
],
|
|
],
|
|
];
|