Fixed tracking config

This commit is contained in:
Alejandro Celaya 2022-09-17 11:27:56 +02:00
parent a87f6c6709
commit 5f87bb13f8
2 changed files with 28 additions and 23 deletions

View File

@ -4,6 +4,10 @@ declare(strict_types=1);
use Shlinkio\Shlink\Core\Config\EnvVars; use Shlinkio\Shlink\Core\Config\EnvVars;
return (static function (): array {
/** @var string|null $disableTrackingFrom */
$disableTrackingFrom = EnvVars::DISABLE_TRACKING_FROM->loadFromEnv();
return [ return [
'tracking' => [ 'tracking' => [
@ -30,7 +34,8 @@ return [
'disable_ua_tracking' => (bool) EnvVars::DISABLE_UA_TRACKING->loadFromEnv(false), 'disable_ua_tracking' => (bool) EnvVars::DISABLE_UA_TRACKING->loadFromEnv(false),
// A list of IP addresses, patterns or CIDR blocks from which tracking is disabled by default // A list of IP addresses, patterns or CIDR blocks from which tracking is disabled by default
'disable_tracking_from' => EnvVars::DISABLE_TRACKING_FROM->loadFromEnv(), 'disable_tracking_from' => $disableTrackingFrom === null ? [] : explode(',', $disableTrackingFrom),
], ],
]; ];
})();

View File

@ -13,11 +13,11 @@ http:
dir: '../../public' dir: '../../public'
forbid: ['.php', '.htaccess'] forbid: ['.php', '.htaccess']
pool: pool:
num_workers: 16 num_workers: 1
jobs: jobs:
pool: pool:
num_workers: 16 num_workers: 1
timeout: 300 timeout: 300
consume: ['shlink'] consume: ['shlink']
pipelines: pipelines: