Enabled support for static files from public dir via RoadRunner

This commit is contained in:
Alejandro Celaya 2022-08-27 17:27:54 +02:00
parent 8852739111
commit a4f979be08
3 changed files with 4 additions and 5 deletions

View file

@ -13,14 +13,11 @@ use Shlinkio\Shlink\Config\ConfigAggregator\EnvVarLoaderProvider;
use function class_exists;
use function Shlinkio\Shlink\Config\env;
use function Shlinkio\Shlink\Config\openswooleIsInstalled;
use function Shlinkio\Shlink\Config\runningInOpenswoole;
use function Shlinkio\Shlink\Config\runningInRoadRunner;
use const PHP_SAPI;
$isTestEnv = env('APP_ENV') === 'test';
// TODO Could check for actual openswoole with runningInOpenswoole()??
$enableSwoole = PHP_SAPI === 'cli' && ! runningInRoadRunner() && openswooleIsInstalled();
$enableSwoole = ! runningInRoadRunner() && runningInOpenswoole();
return (new ConfigAggregator\ConfigAggregator([
! $isTestEnv

View file

@ -8,6 +8,7 @@ server:
http:
address: '0.0.0.0:8080'
middleware: ['static']
static:
dir: '../../public'
forbid: ['.php', '.htaccess']

View file

@ -8,6 +8,7 @@ server:
http:
address: '0.0.0.0:${PORT}'
middleware: ['static']
static:
dir: '../../public'
forbid: ['.php', '.htaccess']