From 164decf2541f6d4f7dc3a8dd8075dae9fcc5b204 Mon Sep 17 00:00:00 2001 From: Handle Date: Tue, 16 Apr 2019 03:02:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=EF=BC=9A=E7=8E=B0=E5=9C=A8?= =?UTF-8?q?=E5=8F=AA=E4=BC=9A=E8=87=AA=E5=8A=A8=E4=BF=A1=E4=BB=BB=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E7=9A=84=E4=B8=8D=E5=AE=89=E5=85=A8=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 13 ++++++++++--- package.json | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 5110e7f..fad2e88 100644 --- a/index.js +++ b/index.js @@ -108,7 +108,8 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' server.get('*', Util.processRequest) -electronApp.commandLine.appendSwitch('ignore-certificate-errors') +// electronApp.commandLine.appendSwitch('ignore-certificate-errors') + electronApp.commandLine.appendSwitch( 'autoplay-policy', 'no-user-gesture-required' @@ -127,8 +128,14 @@ electronApp.on('window-all-closed', () => { electronApp.on( 'certificate-error', (event, webContents, url, error, certificate, callback) => { - event.preventDefault() - callback(true) // eslint-disable-line standard/no-callback-literal + if ( + certificate.fingerprint === '8f27c5f7a0a209da7948db0d2fcd42bac89a1005' + ) { + event.preventDefault() + callback(true) // eslint-disable-line standard/no-callback-literal + } else { + callback(false) + } } ) diff --git a/package.json b/package.json index 23798dc..c783968 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "majsoul-plus-client", - "version": "1.12.0-beta.3", + "version": "1.12.0-beta.4", "productName": "Majsoul Plus", "author": "MajsoulPlus Team", "description": "Majsoul Plus",