diff --git a/app/Services/BrowsershotService.php b/app/Services/BrowsershotService.php index 4d2e318..be7d7b1 100644 --- a/app/Services/BrowsershotService.php +++ b/app/Services/BrowsershotService.php @@ -53,17 +53,18 @@ private function configureBrowsershot(string $url, array $options = []): Browser } // Basic configuration with maximum timeout safeguard - $timeout = $options['timeout'] ?? 30; - $maxTimeout = 300; // 5 minutes maximum to prevent indefinite waiting - $browsershot->timeout(min($timeout, $maxTimeout)); + $timeout = 30; + + if (isset($options['timeout'])) { + $timeout = $options['timeout']; + } + + $browsershot->timeout($timeout); if (isset($options['delay'])) { $browsershot->setDelay($options['delay']); } - // waitUntilNetworkIdle() is always enabled (configured above on line 47) - // Removed conditional logic as network idle waiting is required for production - // Apply ad/tracker blocking if (($options['block_ads'] ?? true) || ($options['block_trackers'] ?? true)) { $easyListService = new EasyListService();