2016-08-17 29 views

cevap

3

app modülü tarafından yayılan certificate-error olaya abone ve öz olay işleyicisi imzalı sertifikayı doğrulamak.

6

Sen "kabuk" (çekirdek elektron init) dosyası aşağıdaki kodu koymak gerekir:

// SSL/TSL: this is the self signed certificate support 
    app.on('certificate-error', (event, webContents, url, error, certificate, callback) => { 
     // On certificate error we disable default behaviour (stop loading the page) 
     // and we then say "it is all fine - true" to the callback 
     event.preventDefault(); 
     callback(true); 
    }); 

Ama bu hali gibi güvensiz (geçersiz) sertifikaları birini imzalı izin verir.

Lütfen bunun sunucuya bağlanmanın güvenli bir yolu olmadığını unutmayın.

Daha fazla bilgi için belgeleri kontrol edebilirsiniz: https://electron.atom.io/docs/api/app/#event-certificate-error

İlgili konular