Browse Source

fix(devtools): patch webrequest to fix devtools

Fix an incompatibility between electron 2.x and devtools by patching the
electron webRequest handler.

See electron/electron#13008 (comment)

This is a follow up from https://github.com/LN-Zap/zap-desktop/pull/491/commits

Fix #490
renovate/lint-staged-8.x
Tom Kirkpatrick 7 years ago
parent
commit
c022937d08
No known key found for this signature in database GPG Key ID: 72203A8EC5967EA8
  1. 2
      app/main.dev.js

2
app/main.dev.js

@ -369,7 +369,7 @@ app.on('ready', async () => {
// HACK: patch webrequest to fix devtools incompatibility with electron 2.x.
// See https://github.com/electron/electron/issues/13008#issuecomment-400261941
session.defaultSession.webRequest.onBeforeRequest({}, (details, callback) => {
if (details.url.indexOf('hack') !== -1) {
if (details.url.indexOf('7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33') !== -1) {
callback({
redirectURL: details.url.replace(
'7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33',

Loading…
Cancel
Save