shlink/module/Core/config/routes.config.php

43 lines
1.1 KiB
PHP
Raw Normal View History

2016-04-10 09:38:07 +02:00
<?php
2019-10-05 17:26:10 +02:00
2017-10-12 10:13:20 +02:00
declare(strict_types=1);
use Fig\Http\Message\RequestMethodInterface as RequestMethod;
use RKA\Middleware\IpAddress;
2016-08-09 10:24:42 +02:00
use Shlinkio\Shlink\Core\Action;
use Shlinkio\Shlink\Core\Middleware;
2016-04-10 09:38:07 +02:00
return [
'routes' => [
[
'name' => Action\RedirectAction::class,
'path' => '/{shortCode}',
'middleware' => [
IpAddress::class,
Action\RedirectAction::class,
],
'allowed_methods' => [RequestMethod::METHOD_GET],
2016-08-09 10:24:42 +02:00
],
[
'name' => Action\PixelAction::class,
'path' => '/{shortCode}/track',
'middleware' => [
IpAddress::class,
Action\PixelAction::class,
],
'allowed_methods' => [RequestMethod::METHOD_GET],
],
2016-08-09 10:24:42 +02:00
[
'name' => Action\QrCodeAction::class,
2016-08-18 11:31:04 +02:00
'path' => '/{shortCode}/qr-code[/{size:[0-9]+}]',
'middleware' => [
Middleware\QrCodeCacheMiddleware::class,
Action\QrCodeAction::class,
],
'allowed_methods' => [RequestMethod::METHOD_GET],
],
2016-04-10 09:38:07 +02:00
],
2016-04-17 19:34:16 +02:00
2016-04-10 09:38:07 +02:00
];