Skip to content

Commit 225c126

Browse files
committed
Updated 'ignoreHttpsErrors' option to 'acceptInsecureCerts' in ignoreHttpsErrors() method
1 parent 172b713 commit 225c126

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

bin/browser.cjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const callChrome = async pup => {
7373
if (request.options.remoteInstanceUrl || request.options.browserWSEndpoint ) {
7474
// default options
7575
let options = {
76-
ignoreHTTPSErrors: request.options.ignoreHttpsErrors
76+
acceptInsecureCerts: request.options.acceptInsecureCerts
7777
};
7878

7979
// choose only one method to connect to the browser instance
@@ -93,7 +93,7 @@ const callChrome = async pup => {
9393
if (!browser) {
9494
browser = await puppet.launch({
9595
headless: request.options.newHeadless ? 'new' : true,
96-
ignoreHTTPSErrors: request.options.ignoreHttpsErrors,
96+
acceptInsecureCerts: request.options.acceptInsecureCerts,
9797
executablePath: request.options.executablePath,
9898
args: request.options.args || [],
9999
pipe: request.options.pipe || false,

src/Browsershot.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public function setScreenshotType(string $type, ?int $quality = null): static
407407

408408
public function ignoreHttpsErrors(): static
409409
{
410-
return $this->setOption('ignoreHttpsErrors', true);
410+
return $this->setOption('acceptInsecureCerts', true);
411411
}
412412

413413
public function mobile(bool $mobile = true): static

tests/BrowsershotTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@
306306
'url' => 'https://example.com',
307307
'action' => 'screenshot',
308308
'options' => [
309-
'ignoreHttpsErrors' => true,
309+
'acceptInsecureCerts' => true,
310310
'path' => 'screenshot.png',
311311
'viewport' => [
312312
'width' => 800,

0 commit comments

Comments
 (0)