server: add --authentication option
This commit is contained in:
parent
48807e9f85
commit
7cb729ff79
6 changed files with 57 additions and 5 deletions
|
|
@ -57,6 +57,12 @@ module.exports = function(options={}) {
|
|||
}
|
||||
})
|
||||
|
||||
window.webContents.on('login', function(event, request, authInfo, callback) {
|
||||
event.preventDefault()
|
||||
var [name, pwd] = settings.read('authentication').split(':')
|
||||
callback(name, pwd)
|
||||
})
|
||||
|
||||
// window.webContents.on('will-navigate', (event)=>event.preventDefault())
|
||||
window.webContents.on('new-window', (event, url)=>{
|
||||
event.preventDefault()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue