[go: nahoru, domu]

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

core(navigation): Add an option to ignore https errors during navigation #7574

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
Use stable (but deprecated) Security.setOverrideCertificateErrors
Somehow this conflicts with redirectPass
  • Loading branch information
Janpot committed Mar 19, 2019
commit aefa83c84c543f5ee56d9eda1e42f62038b79a9f
12 changes: 11 additions & 1 deletion lighthouse-core/gather/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,17 @@ class Driver {
* @return {Promise<void>}
*/
async setIgnoreHttpsErrors() {
await this.sendCommand('Security.setIgnoreCertificateErrors', {ignore: true});
// the devtools protocol also has an experimental Security.setIgnoreCertificateErrors
// https://chromedevtools.github.io/devtools-protocol/tot/Security#method-setIgnoreCertificateErrors
// It can be used instead of the following when it becomes stable.
this.on('Security.certificateError', event => {
this.sendCommand('Security.handleCertificateError', {
eventId: event.eventId,
action: 'continue',
}).catch(err => log.warn('Driver', err));
});
await this.sendCommand('Security.enable');
await this.sendCommand('Security.setOverrideCertificateErrors', {override: true});
}
}

Expand Down