Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(puppeteer): rename ignoreHTTPSErrors to acceptInsecureCerts to support v23 #2684

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/browser-crawler/src/internals/browser-crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ export abstract class BrowserCrawler<
*/
newPageOptions.pageOptions = {
ignoreHTTPSErrors: true,
acceptInsecureCerts: true,
};
}
}
Expand Down Expand Up @@ -747,6 +748,7 @@ export abstract class BrowserCrawler<
* @see https://github.com/puppeteer/puppeteer/blob/main/docs/api.md
*/
(launchContext.launchOptions as Dictionary).ignoreHTTPSErrors = true;
(launchContext.launchOptions as Dictionary).acceptInsecureCerts = true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/puppeteer-ignore-ssl-errors/actor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const mainOptions = {

await Actor.main(async () => {
const crawler = new PuppeteerCrawler({
launchContext: { launchOptions: { ignoreHTTPSErrors: true } },
launchContext: { launchOptions: { acceptInsecureCerts: true } },
preNavigationHooks: [
(_ctx, goToOptions) => {
goToOptions.waitUntil = ['networkidle2'];
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/puppeteer-throw-on-ssl-errors/actor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const mainOptions = {

await Actor.main(async () => {
const crawler = new PuppeteerCrawler({
launchContext: { launchOptions: { ignoreHTTPSErrors: false } }, // This is the default
launchContext: { launchOptions: { acceptInsecureCerts: false } }, // This is the default
preNavigationHooks: [
(_ctx, goToOptions) => {
goToOptions.waitUntil = ['networkidle2'];
Expand Down
Loading