Update
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user