mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 08:18:24 +03:00
Enabled support for static files from public dir via RoadRunner
This commit is contained in:
parent
8852739111
commit
a4f979be08
3 changed files with 4 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -8,6 +8,7 @@ server:
|
|||
|
||||
http:
|
||||
address: '0.0.0.0:8080'
|
||||
middleware: ['static']
|
||||
static:
|
||||
dir: '../../public'
|
||||
forbid: ['.php', '.htaccess']
|
||||
|
|
|
@ -8,6 +8,7 @@ server:
|
|||
|
||||
http:
|
||||
address: '0.0.0.0:${PORT}'
|
||||
middleware: ['static']
|
||||
static:
|
||||
dir: '../../public'
|
||||
forbid: ['.php', '.htaccess']
|
||||
|
|
Loading…
Reference in a new issue