diff --git a/docs/api/session.md b/docs/api/session.md index f04d45195f9..aeda16d38b0 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -274,8 +274,13 @@ verify proc. const {BrowserWindow} = require('electron') let win = new BrowserWindow() -win.webContents.session.setCertificateVerifyProc((hostname, cert, callback) => { - callback(hostname === 'github.com') +win.webContents.session.setCertificateVerifyProc((request, callback) => { + const {hostname} = request + if(hostname === 'github.com') { + callback(0) + } else { + callback(-2) + } }) ```