Update
This commit is contained in:
@@ -23,7 +23,9 @@ public function crawl(Request $request): JsonResponse
|
||||
'block_ads' => 'boolean',
|
||||
'block_cookie_banners' => 'boolean',
|
||||
'block_trackers' => 'boolean',
|
||||
'wait_until_network_idle' => 'boolean'
|
||||
'webhook_url' => 'nullable|url|max:2048',
|
||||
'webhook_events_filter' => 'nullable|array',
|
||||
'webhook_events_filter.*' => 'in:queued,processing,completed,failed'
|
||||
]);
|
||||
|
||||
$uuid = Str::uuid()->toString();
|
||||
@@ -33,13 +35,15 @@ public function crawl(Request $request): JsonResponse
|
||||
'type' => 'crawl',
|
||||
'url' => $validated['url'],
|
||||
'status' => 'queued',
|
||||
'webhook_url' => $validated['webhook_url'] ?? null,
|
||||
'webhook_events_filter' => isset($validated['webhook_events_filter']) ? $validated['webhook_events_filter'] : ['queued', 'processing', 'completed', 'failed'],
|
||||
'parameters' => array_filter([
|
||||
'timeout' => $validated['timeout'] ?? 30,
|
||||
'delay' => $validated['delay'] ?? 0,
|
||||
'block_ads' => $validated['block_ads'] ?? true,
|
||||
'block_cookie_banners' => $validated['block_cookie_banners'] ?? true,
|
||||
'block_trackers' => $validated['block_trackers'] ?? true,
|
||||
'wait_until_network_idle' => $validated['wait_until_network_idle'] ?? false
|
||||
'block_trackers' => $validated['block_trackers'] ?? true
|
||||
// wait_until_network_idle is always enabled in BrowsershotService
|
||||
])
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user