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