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