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

59 lines
1.6 KiB
PHP
Raw Normal View History

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);
use Fig\Http\Message\RequestMethodInterface as RequestMethod;
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' => [
[
'name' => Action\RobotsAction::class,
'path' => '/robots.txt',
'middleware' => [
Action\RobotsAction::class,
],
'allowed_methods' => [RequestMethod::METHOD_GET],
],
[
'name' => Action\RedirectAction::class,
'path' => '/{shortCode}',
'middleware' => [
IpAddress::class,
Action\RedirectAction::class,
],
'allowed_methods' => [RequestMethod::METHOD_GET],
2016-08-09 11:24:42 +03:00
],
[
'name' => Action\PixelAction::class,
'path' => '/{shortCode}/track',
'middleware' => [
IpAddress::class,
Action\PixelAction::class,
],
'allowed_methods' => [RequestMethod::METHOD_GET],
],
2016-08-09 11:24:42 +03:00
[
'name' => Action\QrCodeAction::class,
2020-11-27 19:05:13 +03:00
'path' => '/{shortCode}/qr-code',
'middleware' => [
Action\QrCodeAction::class,
],
'allowed_methods' => [RequestMethod::METHOD_GET],
],
// Deprecated
[
'name' => 'old_' . Action\QrCodeAction::class,
'path' => '/{shortCode}/qr-code/{size:[0-9]+}',
'middleware' => [
Action\QrCodeAction::class,
],
'allowed_methods' => [RequestMethod::METHOD_GET],
],
2016-04-10 10:38:07 +03:00
],
2016-04-17 20:34:16 +03:00
2016-04-10 10:38:07 +03:00
];