2017-01-22 04:07:18 -06:00
|
|
|
<?php
|
2019-10-05 10:26:10 -05:00
|
|
|
|
2017-10-12 03:13:20 -05:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-01-01 14:11:53 -06:00
|
|
|
use Mezzio\Router\FastRouteRouter;
|
2022-01-20 13:16:37 -06:00
|
|
|
use Shlinkio\Shlink\Core\Config\EnvVars;
|
2021-08-07 04:05:20 -05:00
|
|
|
|
2017-01-22 04:07:18 -06:00
|
|
|
return [
|
|
|
|
|
|
|
|
'router' => [
|
2024-10-13 05:24:59 -05:00
|
|
|
'base_path' => EnvVars::BASE_PATH->loadFromEnv(),
|
2019-09-13 13:03:53 -05:00
|
|
|
|
2017-01-22 04:07:18 -06:00
|
|
|
'fastroute' => [
|
2024-02-16 16:02:46 -06:00
|
|
|
// Disabling config cache for cli, ensures it's never used for RoadRunner, and also that console
|
2024-01-03 12:22:33 -06:00
|
|
|
// commands don't generate a cache file that's then used by php-fpm web executions
|
2024-10-23 03:53:09 -05:00
|
|
|
FastRouteRouter::CONFIG_CACHE_ENABLED => EnvVars::isProdEnv() && PHP_SAPI !== 'cli',
|
2017-01-22 04:07:18 -06:00
|
|
|
FastRouteRouter::CONFIG_CACHE_FILE => 'data/cache/fastroute_cached_routes.php',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
];
|