diff options
| -rw-r--r-- | electron_js/main.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/electron_js/main.js b/electron_js/main.js index 3f56b332..bac574d9 100644 --- a/electron_js/main.js +++ b/electron_js/main.js @@ -68,6 +68,15 @@ const mx = globalShortcut.register('CommandOrControl+Alt+F', () => { height: mainWindowState.height, webPreferences:{nodeIntegration:false}}); + + win.webContents.session.webRequest.onHeadersReceived({}, (d, c) => { + if(d.responseHeaders['x-frame-options'] || d.responseHeaders['X-Frame-Options']){ + delete d.responseHeaders['x-frame-options']; + delete d.responseHeaders['X-Frame-Options']; + } + c({cancel: false, responseHeaders: d.responseHeaders}); + }); + mainWindowState.manage(win); // fs will be arg 1 if its not run in electron debug mode if (argv.fs) @@ -76,6 +85,7 @@ const mx = globalShortcut.register('CommandOrControl+Alt+F', () => { isFs = true; } + // and load the index.html of the app. @@ -89,6 +99,7 @@ const mx = globalShortcut.register('CommandOrControl+Alt+F', () => { // Dereference the window object, usually you would store windows // in an array if your app supports multi windows, this is the time // when you should delete the corresponding element. + win.removeAllListeners(); win = null; }); } |
