Skip to content

Commit

Permalink
改进:现在只会自动信任本地的不安全证书
Browse files Browse the repository at this point in the history
  • Loading branch information
iamapig120 committed Apr 15, 2019
1 parent 164decf commit e2c886c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'

server.get('*', Util.processRequest)

// electronApp.commandLine.appendSwitch('ignore-certificate-errors')

electronApp.commandLine.appendSwitch(
'autoplay-policy',
'no-user-gesture-required'
Expand All @@ -129,7 +127,7 @@ electronApp.on(
'certificate-error',
(event, webContents, url, error, certificate, callback) => {
if (
certificate.fingerprint === '8f27c5f7a0a209da7948db0d2fcd42bac89a1005'
certificate.fingerprint === 'sha256/UMNIGcBbbIcru/0L2e1idl+aQS7PUHqsZDcrETqdMsc='
) {
event.preventDefault()
callback(true) // eslint-disable-line standard/no-callback-literal
Expand Down

0 comments on commit e2c886c

Please sign in to comment.