mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Enabled support for static files from public dir via RoadRunner
This commit is contained in:
parent
8852739111
commit
a4f979be08
@ -13,14 +13,11 @@ use Shlinkio\Shlink\Config\ConfigAggregator\EnvVarLoaderProvider;
|
|||||||
|
|
||||||
use function class_exists;
|
use function class_exists;
|
||||||
use function Shlinkio\Shlink\Config\env;
|
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 function Shlinkio\Shlink\Config\runningInRoadRunner;
|
||||||
|
|
||||||
use const PHP_SAPI;
|
|
||||||
|
|
||||||
$isTestEnv = env('APP_ENV') === 'test';
|
$isTestEnv = env('APP_ENV') === 'test';
|
||||||
// TODO Could check for actual openswoole with runningInOpenswoole()??
|
$enableSwoole = ! runningInRoadRunner() && runningInOpenswoole();
|
||||||
$enableSwoole = PHP_SAPI === 'cli' && ! runningInRoadRunner() && openswooleIsInstalled();
|
|
||||||
|
|
||||||
return (new ConfigAggregator\ConfigAggregator([
|
return (new ConfigAggregator\ConfigAggregator([
|
||||||
! $isTestEnv
|
! $isTestEnv
|
||||||
|
@ -8,6 +8,7 @@ server:
|
|||||||
|
|
||||||
http:
|
http:
|
||||||
address: '0.0.0.0:8080'
|
address: '0.0.0.0:8080'
|
||||||
|
middleware: ['static']
|
||||||
static:
|
static:
|
||||||
dir: '../../public'
|
dir: '../../public'
|
||||||
forbid: ['.php', '.htaccess']
|
forbid: ['.php', '.htaccess']
|
||||||
|
@ -8,6 +8,7 @@ server:
|
|||||||
|
|
||||||
http:
|
http:
|
||||||
address: '0.0.0.0:${PORT}'
|
address: '0.0.0.0:${PORT}'
|
||||||
|
middleware: ['static']
|
||||||
static:
|
static:
|
||||||
dir: '../../public'
|
dir: '../../public'
|
||||||
forbid: ['.php', '.htaccess']
|
forbid: ['.php', '.htaccess']
|
||||||
|
Loading…
Reference in New Issue
Block a user