electron 增加/修改请求的header信息
const { session } = require('electron')
// 给所有请求增加一个header
session.defaultSession.webRequest.onBeforeSendHeaders({ urls: ['*'] }, (details, callback) => {
details.requestHeaders['Version'] = '20190620'
callback({ cancel: false, requestHeaders: details.requestHeaders })
})