From 4a80723243fe53e384a12b7f3c720fc75fce7c8c Mon Sep 17 00:00:00 2001 From: ct Date: Sun, 10 Aug 2025 23:21:30 +0800 Subject: [PATCH] Update --- app/Services/BrowsershotService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Services/BrowsershotService.php b/app/Services/BrowsershotService.php index 908c534..f4610b6 100644 --- a/app/Services/BrowsershotService.php +++ b/app/Services/BrowsershotService.php @@ -43,7 +43,10 @@ public function takeScreenshot(string $url, array $options = []): array private function configureBrowsershot(string $url, array $options = []): Browsershot { - $browsershot = Browsershot::url($url); + $browsershot = Browsershot::url($url) + ->waitUntilNetworkIdle() + ->preventUnsuccessfulResponse(); + if (App::environment('production')) { $browsershot->noSandbox();