server: add --use-ssl option

This commit is contained in:
bordun 2020-05-05 14:50:17 +02:00
parent ce8d8dcbd9
commit faab8d9ea1
8 changed files with 94 additions and 16 deletions

View file

@ -57,6 +57,15 @@ module.exports = function(options={}) {
}
})
window.webContents.on('certificate-error', function(event, url, error, certificate, callback) {
if (error === 'net::ERR_CERT_AUTHORITY_INVALID') {
// self signed certificate is ok
event.preventDefault()
callback(true)
}
})
window.webContents.on('login', function(event, request, authInfo, callback) {
event.preventDefault()
var [name, pwd] = settings.read('authentication').split(':')