Skip to content

Commit c7c467f

Browse files
authored
move skip IPs configuration to preflight settings (alexjustesen#2557)
Co-authored-by: Alex Justesen <[email protected]>
1 parent 03e02b6 commit c7c467f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

app/Jobs/Ookla/SkipSpeedtestJob.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ private function shouldSkip(string $externalIp): bool|string
9292
$skipIPs = array_filter(
9393
array_map(
9494
'trim',
95-
explode(',', config('speedtest.skip_ips')),
95+
explode(',', config('speedtest.preflight.skip_ips')),
9696
),
9797
);
9898

99-
if (count($skipIPs) < 1) {
99+
if (empty($skipIPs)) {
100100
return false;
101101
}
102102

config/speedtest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@
3232
'preflight' => [
3333
'external_ip_url' => env('SPEEDTEST_CHECKINTERNET_URL') ?? env('SPEEDTEST_EXTERNAL_IP_URL', 'https://icanhazip.com'),
3434
'internet_check_hostname' => env('SPEEDTEST_CHECKINTERNET_URL') ?? env('SPEEDTEST_INTERNET_CHECK_HOSTNAME', 'icanhazip.com'),
35+
'skip_ips' => env('SPEEDTEST_SKIP_IPS'),
3536
],
3637

3738
/**
3839
* IP filtering settings.
3940
*/
4041
'allowed_ips' => env('ALLOWED_IPS'),
4142

42-
'skip_ips' => env('SPEEDTEST_SKIP_IPS', ''),
43-
4443
/**
4544
* Threshold settings.
4645
*/

0 commit comments

Comments
 (0)