mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 16:26:37 +03:00
Added HEAD request implicit handling
This commit is contained in:
parent
2b1011de52
commit
ec8cbf82e5
1 changed files with 14 additions and 5 deletions
|
@ -5,8 +5,9 @@ declare(strict_types=1);
|
||||||
namespace Shlinkio\Shlink;
|
namespace Shlinkio\Shlink;
|
||||||
|
|
||||||
use Laminas\Stratigility\Middleware\ErrorHandler;
|
use Laminas\Stratigility\Middleware\ErrorHandler;
|
||||||
use Mezzio;
|
use Mezzio\Helper;
|
||||||
use Mezzio\ProblemDetails;
|
use Mezzio\ProblemDetails;
|
||||||
|
use Mezzio\Router;
|
||||||
use PhpMiddleware\RequestId\RequestIdMiddleware;
|
use PhpMiddleware\RequestId\RequestIdMiddleware;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -14,7 +15,7 @@ return [
|
||||||
'middleware_pipeline' => [
|
'middleware_pipeline' => [
|
||||||
'error-handler' => [
|
'error-handler' => [
|
||||||
'middleware' => [
|
'middleware' => [
|
||||||
Mezzio\Helper\ContentLengthMiddleware::class,
|
Helper\ContentLengthMiddleware::class,
|
||||||
ErrorHandler::class,
|
ErrorHandler::class,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -35,14 +36,15 @@ return [
|
||||||
|
|
||||||
'routing' => [
|
'routing' => [
|
||||||
'middleware' => [
|
'middleware' => [
|
||||||
Mezzio\Router\Middleware\RouteMiddleware::class,
|
Router\Middleware\RouteMiddleware::class,
|
||||||
|
Router\Middleware\ImplicitHeadMiddleware::class,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
'rest' => [
|
'rest' => [
|
||||||
'path' => '/rest',
|
'path' => '/rest',
|
||||||
'middleware' => [
|
'middleware' => [
|
||||||
Mezzio\Router\Middleware\ImplicitOptionsMiddleware::class,
|
Router\Middleware\ImplicitOptionsMiddleware::class,
|
||||||
Rest\Middleware\BodyParserMiddleware::class,
|
Rest\Middleware\BodyParserMiddleware::class,
|
||||||
Rest\Middleware\AuthenticationMiddleware::class,
|
Rest\Middleware\AuthenticationMiddleware::class,
|
||||||
],
|
],
|
||||||
|
@ -50,7 +52,7 @@ return [
|
||||||
|
|
||||||
'dispatch' => [
|
'dispatch' => [
|
||||||
'middleware' => [
|
'middleware' => [
|
||||||
Mezzio\Router\Middleware\DispatchMiddleware::class,
|
Router\Middleware\DispatchMiddleware::class,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -67,4 +69,11 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'dependencies' => [
|
||||||
|
'factories' => [
|
||||||
|
Router\Middleware\ImplicitHeadMiddleware::class => Router\Middleware\ImplicitHeadMiddlewareFactory::class,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue