fix some issu
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Product;
|
||||
use App\Models\Setting;
|
||||
use Carbon\Carbon;
|
||||
@@ -120,6 +121,7 @@ class ZaarboxPriceService
|
||||
try {
|
||||
$prices = Http::withoutVerifying()
|
||||
->timeout(12)
|
||||
->withOptions(Controller::httpClientOptions([], 12.0))
|
||||
->get($url)
|
||||
->json();
|
||||
|
||||
@@ -543,7 +545,11 @@ class ZaarboxPriceService
|
||||
|
||||
try {
|
||||
if ($apiUrl !== null && trim($apiUrl) !== '') {
|
||||
$prices = Http::withoutVerifying()->timeout(12)->get($apiUrl)->json();
|
||||
$prices = Http::withoutVerifying()
|
||||
->timeout(12)
|
||||
->withOptions(Controller::httpClientOptions([], 12.0))
|
||||
->get($apiUrl)
|
||||
->json();
|
||||
} else {
|
||||
$prices = $this->fetchFeedWithFailover();
|
||||
}
|
||||
@@ -804,7 +810,10 @@ class ZaarboxPriceService
|
||||
$responses = Http::pool(function ($pool) use ($now) {
|
||||
foreach (self::PERIODS as $key => $config) {
|
||||
$start = $now->copy()->subHours($config['hours']);
|
||||
$pool->as($key)->withoutVerifying()->timeout(12)->withHeaders([
|
||||
$pool->as($key)->withoutVerifying()
|
||||
->timeout(12)
|
||||
->withOptions(Controller::httpClientOptions([], 12.0))
|
||||
->withHeaders([
|
||||
'Referer' => 'https://tablo.montest.ir/',
|
||||
'User-Agent' => 'Mozilla/5.0',
|
||||
])->get($this->historyUrl($start, $now));
|
||||
|
||||
Reference in New Issue
Block a user