diff --git a/bin/browser.cjs b/bin/browser.cjs index 429ee38..04e0c20 100644 --- a/bin/browser.cjs +++ b/bin/browser.cjs @@ -73,7 +73,7 @@ const callChrome = async pup => { if (request.options.remoteInstanceUrl || request.options.browserWSEndpoint ) { // default options let options = { - ignoreHTTPSErrors: request.options.ignoreHttpsErrors + acceptInsecureCerts: request.options.acceptInsecureCerts }; // choose only one method to connect to the browser instance @@ -93,7 +93,7 @@ const callChrome = async pup => { if (!browser) { browser = await puppet.launch({ headless: request.options.newHeadless ? 'new' : true, - ignoreHTTPSErrors: request.options.ignoreHttpsErrors, + acceptInsecureCerts: request.options.acceptInsecureCerts, executablePath: request.options.executablePath, args: request.options.args || [], pipe: request.options.pipe || false, diff --git a/src/Browsershot.php b/src/Browsershot.php index 60251fa..f67101a 100644 --- a/src/Browsershot.php +++ b/src/Browsershot.php @@ -407,7 +407,7 @@ public function setScreenshotType(string $type, ?int $quality = null): static public function ignoreHttpsErrors(): static { - return $this->setOption('ignoreHttpsErrors', true); + return $this->setOption('acceptInsecureCerts', true); } public function mobile(bool $mobile = true): static diff --git a/tests/BrowsershotTest.php b/tests/BrowsershotTest.php index 35e906f..35ec887 100644 --- a/tests/BrowsershotTest.php +++ b/tests/BrowsershotTest.php @@ -334,7 +334,7 @@ 'url' => 'https://example.com', 'action' => 'screenshot', 'options' => [ - 'ignoreHttpsErrors' => true, + 'acceptInsecureCerts' => true, 'path' => 'screenshot.png', 'viewport' => [ 'width' => 800,